Michael Del Zotto set up Nash's decisive tally and also supplied a short-handed goal as the Rangers notched a second straight win and joined the Devils in the eighth and final Eastern Conference post-season spot with 32 points.
Henrik Lundqvist played well with 29 saves and Carl Hagelin also scored for New York.
Johan Hedberg made 19 saves in the loss.
Millions of Getty images now available for free via embed tool
Boston schools pull out free condoms over wrapping complaints