The Maple Leafs, who have won five of their past six games, bounced back from a 4-1 loss to the Boston Bruins on Saturday.
Rickard Rakell led Anaheim with a pair of goals, while Corey Perry tied a career high with four assists.
Toronto goalie Frederik Andersen (25 saves) had to leave the game with a potential concussion after being hit by Perry with 6:15 left in the second period. He was replaced by Curtis McElhinney, who allowed a goal by Rakell that tied the game, 4-4, at 2:07 of the third period.
The Maple Leafs quickly retook the lead when Nylander scored 1:21 later. Matthews' second goal of the game provided a 6-4 cushion with 3:11 remaining. Matthews has six goals in the past eight games.
Zach Hyman's empty-net goal sealed the game for the Maple Leafs with 54 seconds left.
McElhinney wound up saving 15 of the 16 shots he faced. Ducks goalie Ryan Miller made 33 saves.
The Ducks have dropped their past three games in Toronto. Anaheim managed to outshoot the Maple Leafs 44-40.
Matthews opened the scoring 6:32 into the game. Anaheim's Ryan Getzlaf tied the score 43 seconds into the second period on a deft pass from Rakell, who earned an assist for the fourth straight game.
Toronto responded when Jake Gardiner (three assists) stole the puck and flicked a pass to Nylander, who one-timed his shot past Miller for a 2-1 lead with 14:08 remaining in the second period.
However, the Ducks tied the game three minutes later when Perry did an effective job holding the puck before making a pass to Getzlaf, who then found Rakell for the short-range goal.
Anaheim then took its only lead, 3-2, on the power when Ondrej Kase poked in a loose puck with 11:06 left in the second. After Perry had to leave the game, the Maple Leafs tied the score on a man-advantage goal by Mitch Marner with 4:32 remaining in the second.
The Maple Leafs regained the lead, 4-3, just over two minutes later on Leo Komarov's fifth goal of the season.
--Field Level Media
Anaheim | Toronto | |
Corey Perry 4 | Points | Auston Matthews 3 |
Rickard Rakell 2 | Goals | Auston Matthews 2 |
Corey Perry 4 | Assists | Jake Gardiner 3 |
Ondrej Kase 1 | Power Play Goals | Mitchell Marner 1 |
N/A | Short Handed Goals | N/A |
Ryan Miller .846 | Save Percentage | Curtis McElhinney .938 |
Ryan Miller 33 | Saves | Frederik Andersen 25 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
Anaheim | 44 | 4 | 1-3 | 2-3 | 6 | 33 |
Toronto | 40 | 7 | 1-3 | 2-3 | 6 | 38 |