Dylan Larkin, Darren Helm, Andreas Athanasiou, Danny DeKeyser and Evgeny Svechnikov also scored for the Red Wings. Detroit has won back-to-back games for the first time since February.
Jack Eichel, Ryan O'Reilly and Evan Rodrigues scored for Buffalo, which has lost five of its past six games.
Detroit goaltender Jimmy Howard stopped 29 of 32 shots for his 21st win of the season and the 220th win of his career. Only Terry Sawchuk (351) and Chris Osgood (317) have won more games with the franchise.
Buffalo goaltender Robin Lehner surrendered three goals on 20 shots before he was pulled. His replacement, Chad Johnson, allowed three goals on 12 shots.
Buffalo struck first 3:16 after the opening faceoff. Eichel carried the puck into the offensive zone and fired a wrist shot from the right circle for his 25th goal.
O'Reilly scored on the power play less than four minutes later to double Buffalo's lead.
Detroit responded 30 seconds later to cut the deficit to 2-1. Larkin netted his 13th goal on a wrist shot.
The Red Wings evened the score at 2 when Helm scored a short-handed goal at 5:21 of the second period. The goal marked Helm's third short-handed tally of the season and the fifth of his career.
Mantha put Detroit on top 3-2 when he pounced on a rebound with 3:34 remaining in the second period. Frans Nielsen set up Joe Hicketts for a one-timer, and Mantha punched in the loose puck near the crease.
A remarkable no-look, backhand pass from Justin Abdelkader set up Athanasiou's goal to make it 4-2 in the first two minutes of the third period. Athanasiou grinned at the delivery after potting his 15th goal.
Buffalo climbed within 4-3 when Rodrigues scored with 15:09 to play in the third period.
Detroit regained a two-goal lead midway through the third period on DeKeyser's first goal in 17 games.
Svechnikov finished the scoring for the Red Wings with 3:01 to play.
--Field Level Media
Detroit | Buffalo | |
Dylan Larkin 2 | Points | Jack Eichel 1 |
Dylan Larkin 1 | Goals | Jack Eichel 1 |
Frans Nielsen 2 | Assists | Brendan Guhle 1 |
N/A | Power Play Goals | Ryan O'Reilly 1 |
Darren Helm 1 | Short Handed Goals | N/A |
Jimmy Howard .906 | Save Percentage | Robin Lehner .850 |
Jimmy Howard 29 | Saves | Robin Lehner 17 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
Detroit | 32 | 6 | 0-5 | 3-4 | 8 | 33 |
Buffalo | 32 | 3 | 1-4 | 5-5 | 10 | 38 |