Nylander scored two goals after not scoring in the previous seven games. He had an assist on one of Mitch Marner's two goals.
Frederik Andersen made 19 saves in his ninth straight start for Toronto (18-14-4), which is 5-1-0 in its past six games and 9-4-0 since coach Sheldon Keefe took over for Mike Babcock on Nov. 20.
WATCH: [All Maple Leafs vs. Rangers highlights]
"We've seen progress for sure, and I like that," Keefe said. "Even at times when it hasn't looked the greatest we're still seeing progress. Today was a different type of game. We score early again and the game gets away from us. It's even going to the third period, then we get the lead and I thought we did a good job of taking care of it, so there's progress and that's really what you're looking for."
The Maple Leafs outscored the Rangers 3-0 in the third period, a change from their season-long trend of struggling in the third. They were a minus-14 in goal differential in the third period entering the game (38-52) and their 52 goals allowed are the most in the League.
"We controlled the puck, we didn't throw it away, kept the pedal down," Marner said. "That's something we've just got to make sure we keep doing in the thirds. It's something that we haven't been consistent at. We have to make sure just keep the pedal down in the thirds, make sure we're trying to give teams no space."