MacKinnon, who also had an assist and extended his point streak to seven games (four goals, nine assists), took a pass from Mikko Rantanen, stopped to let Maple Leafs defenseman Jake McCabe slide by, and beat Martin Jones with a wrist shot from the left circle at 16:35.
Ross Colton scored into an empty net with seven seconds left for the 5-3 final.
Rantanen and Jonathan Drouin each had a goal and an assist, and Alexandar Georgiev made 26 saves for the Avalanche (28-12-3), who have won three in a row.
Max Domi, Morgan Rielly and Timothy Liljegren scored for the Maple Leafs (21-11-8), who ended a five-game point streak (4-0-1). Jones made 28 saves in his seventh straight start.
Drouin cut it to 3-1 at 5:27 of the second period on the power play when he one-timed a pass from Colton in the slot.
Rantanen made it 3-2 at 13:13, putting in a rebound from Samuel Girard’s point shot.
Andrew Cogliano tied it 3-3 at 7:35 of the third period when he beat Jones from the slot off a rebound from Josh Manson’s point shot.
The Maple Leafs took a 1-0 lead at 6:23 of the first period when Domi’s shot from above the left faceoff circle deflected in off Manson’s chest in the slot.
Rielly made it 2-0 at 10:47. After flipping the puck ahead in the neutral zone, Rielly won the puck from Avalanche defenseman Devon Toews at the blue line and beat Giorgiev with a backhand on a breakaway.
Liljegren pushed it to 3-0 at 15:04 when he put in a loose puck from below the right circle during a scramble in front of the net.
Avalanche defenseman Jack Johnson left the game at 15:18 of the second period with a lower-body injury and did not return.