Tomas Tatar scored two goals for Detroit, Riley Sheahan a goal and an assist, and Johan Franzen also scored. Jimmy Howard stopped 19 shots.
Pacioretty gave Montreal a 4-3 lead with a shot from the right circle that deflected off Detroit defenceman Niklas Kronwall for Pacioretty's 33rd goal. The play appeared to be offside.
Vanek got his 26th goal with 8:45 left on a tip in to make it 5-3.
Franzen brought the Red Wings to within 5-4 21 seconds later. Franzen's 16th goal broke a nine-game goal-scoring drought.
Tatar scored twice over 3:06 early in the third period to tie the game at 3.
He brought Detroit to within 3-2 with a wrist shot from the high slot 1:24 into the third after intercepting Subban's pass. Tatar tied it at 4:30 on a shot from the bottom of the right circle for his 18th goal.
Sheahan put the Red Wings on the board and cut the Canadiens lead to 2-1, 1:28 into the second period with his sixth goal.
But Desharnais restored Montreal's two-goal lead with 8:57 remaining in the middle period. It was his 14th goal.
Plekanec's two goals gave Montreal a 2-0 lead in the first period.
He opened the scoring 7:49 into the game, then got his 20th goal with 5:49 left in the opening period.
NOTE: Detroit RW Tomas Jurco returned after missing seven games with a broken rib. . Montreal LW Travis Moen missed his second game with a concussion. . Red Wings C Pavel Datsyuk, who has missed 13 games with a sore knee, is skating but there's no timetable for his return. . Detroit C Henrik Zetterberg, who had back surgery on Feb. 21, won't be cleared for contact until April 18-19. . Pacioretty played college hockey at the University of Michigan. ... Montreal D Mike Weaver played college hockey at Michigan State. ... Canadiens' RW Dale Weise missed his second game with an upper-body injury.