Miller made it 3-2 at 11:25 of the third. Grabner thought he tied it 44 seconds later, but video review showed that Kevin Hayes entered the zone early.
Toronto coach Mike Babcock gave credit to assistant Andrew Brewer and video analyst Jordan Bean for catching the offside and signaling down to the bench for him to challenge.
"I never thought much about it," Babcock said. "I mean, [Hayes'] foot was offside. It was obvious."
Nylander gave Toronto a 1-0 lead at 17:14 of the first period, 5:13 after the Maple Leafs finished killing off a 5-on-3 Rangers power play. He scored his seventh of the season on a far-side one-timer from the right circle off a pass from Matthews.
The goal capped a 63-second possession in the offensive zone, all after the Rangers iced the puck and were forced to keep the same players on the ice, including defenseman Kevin Shattenkirk, who was credited with a shift length of 3:43.
"Their line [Matthews, Hyman and Nylander] dominated," Babcock said. "They were heavy in the offensive zone. They made good plays. They scored two goals. They were a good line."
Hainsey made it 2-0 with a power-play goal 50 seconds into the second period. Vesey cut the lead in half 1:47 later.
"We wanted to focus and not really be in holiday mode yet," Matthews said. "Just take 60 minutes out of your day, play a hockey game, play it well and then have the rest of the break."