It was a team-record 11th regular-season overtime goal for Marchand, who also had two assists.
Torey Krug had two goals and two assists, and David Pastrnak had three assists for the Bruins, who won for the fourth game in a row.
Anton Khudobin made 30 saves for Boston, which led 2-0 after 52 seconds and never trailed but needed overtime after Martin Frk made it 5-5 midway through the third period.
Anthony Mantha had two goals and two assists for Detroit, which has lost four straight, seven of nine and 17 of 26 since it last topped .500 on Jan. 5.
Jared Coreau was beaten by the first two shots he faced and stopped just 12 of 16 shots before he was replaced 3:27 into the second period. Jimmy Howard faced 19 shots and saved 17 of them.
The Bruins led 2-0, 4-2 and 5-3 before Mantha scored his second goal in a four-minute span to make it a one-goal game with a little more than four minutes left in the second. It stayed that way until Frk was left alone in the slot, falling to his knees as he swatted the pass from Tyler Bertuzzi into the net with 10:14 remaining in regulation.
The Red Wings attacked first in the overtime but got a bad bounce off an official near their own blue line, allowing the Bruins to move in on the net. Marchand picked up a rebound off Krug's shot, moved it to his backhand and scored the winner, triggering an avalanche of the free green hats given out in honor of Irish Heritage Night.
Krug and Jake DeBrusk scored 15 seconds apart in the opening minute of the game. But the Red Wings tied it, getting a power play goal from Frans Nielsen 84 seconds later and a goal from Mike Green about five minutes after that.
Krug made it 3-2 on a power play with about six minutes left in the first, and Marchand gave the Bruins a 4-2 lead with six to play in the second.
NOTES: Bruins defenseman Charlie McAvoy is out for at least a month with a sprained left MCL. General manager Don Sweeney said earlier Tuesday that McAvoy will be evaluated in four weeks. He was injured Saturday in the opening shift of Boston's 2-1 overtime win over Montreal. ... It was the 600th meeting between the two Original Six teams. Detroit holds a 251-250-95-4 edge, but Boston has gone 14-1-1 in the last 16 games. ... It was Irish Heritage Night, and the Bruins practice jerseys were green with plaid trim. Irish step dancers and musicians were featured in the concourse and vomitoria. ... Coreau made his first NHL appearance of the season after being named the AHL goaltender of the month in February.
Red Wings: Host the Golden Knights on Thursday night.
Bruins: Host the Flyers on Thursday night.
More NHL hockey: https://apnews.com/tag/NHLhockey
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.