Auston Matthews scored with 30.2 seconds left to give the Maple Leafs a 3-2 victory over the Red Wings.
Matthews took William Nylander's pass and snapped a high shot into the roof of the net from a sharp angle for his 27th goal of the season, but just his fourth winner.
James van Riemsdyk and Mitch Marner also scored for Toronto, and Curtis McElhinney made 27 saves.
Anthony Mantha and Henrik Zetterberg scored for Detroit.
Petr Mrazek stopped 31-of-34 shots for Detroit, which had won three of its previous four.
The Wings are seven points out of the second Wild Card spot in the East. They host the Preds tomorrow night.