Marchand shot from the top of the left face-off circle on the rush, and the puck went in off goalie Tristan Jarry after hitting the right post to make it 5-4.
"When we were a little stronger in our zone defensively and got pucks out quicker, then you saw we got some more opportunities," said Marchand, who had two goals and three assists to extend his point streak to 13 games (10 goals, 18 assists). "That's our game. We got away from it. I think we got a little comfortable. We got up 3-0, saw their goalie got pulled, and we kind of sat back a little bit. But we're a good team, and we regrouped in the third there and we got it done.
"At the end of the day, it's regular season, it doesn't matter how you win, you just have to win."
\[WATCH: All Penguins vs. Bruins highlights\]
David Pastrnak had a goal and an assist to extend his point streak to 12 games (14 goals, 15 assists), and Jaroslav Halak made 40 saves for Boston (11-1-2), which is 8-0-2 in its past 10 games.
Torey Krug tied the game 4-4 for the Bruins at 8:14 of the third period after the Penguins scored four straight goals in the second to take the lead.
Pittsburgh goalie Matt Murray allowed three goals on 11 shots before being relieved by Jarry, who made 12 saves in 34:37.
It was the first regulation loss for the Penguins (8-6-1) in four games (2-1-1).
"This is one of the best games we played all year," Pittsburgh coach Mike Sullivan said. "I mean, we're playing one of the top teams in the League. The second period, you knew they were going to push back. They've got some talent on that team too. I thought our third period was strong. We had zone time, we had scoring chances, we were making good decisions. I loved our energy. Everybody was involved. I thought it was a really good game by our team; we just didn't win."
Jake DeBrusk gave the Bruins a 1-0 lead at 5:24 of the first period.