The Rangers snapped a three-game home losing streak.
Nedved scored after Islanders goaltender Garth Snow dropped the puck in the crease following a shot by Jan Hlavac. Messier made it 2-0 after Snow collided with teammate Eric Cairns, leaving the net vacant.
Matthew Barnaby scored off a brilliant pass from defenseman Brian Leetch, helping the Rangers to their first home win since Nov. 23. They are 7-7-2 at Madison Square Garden.
Mike Dunham made a handful of outstanding saves, one off defenseman Adrian Aucoin from the doorstep in the final 10 seconds to preserve the win.