Pastrnak notched a power-play goal with 3:30 remaining to give the Bruins their first lead since it was 1-0. Matt Grzelcyk and Brad Marchand assisted on the go-ahead tally.
Pastrnak added an empty-net goal with 1:34 to play for his 27th goal of the season.
The Hurricanes had scored four consecutive goals before Boston matched that production.
Marchand, Grzelcyk and Danton Heinen also scored for Boston. Riley Nash and Marchand each provided two assists while Pastrnak and Grzelcyk had one apiece.
Carolina's goals were scored by Sebastian Aho, Teuvo Teravainen, Justin Williams and Brock McGinn. Elias Lindholm and Justin Faulk both had two assists.
The Bruins scored three goals in 77 seconds to wipe out a third-period deficit before capturing the lead. Grzelcyk began the rally with 9:56 minutes to play before Pastrnak added to the surge 56 seconds later.
The outcome was another devastating blow to Carolina's fading playoff hopes in the Eastern Conference.
Bruins goaltender Tuukka Rask stopped 29 shots.
Carolina goalie Cam Ward made 28 saves. The Hurricanes were coming off a 6-3 loss at night earlier at the New York Rangers when Scott Darling was in the Carolina nets.
Boston scored on five of 15 third-period shots.
Marchand, a left winger who missed Sunday's loss at Chicago because of an upper-body injury, scored with 10.5 seconds left in the first period for the game's first goal.
The Bruins outshot Carolina 13-7 in the first period before the Hurricanes came out buzzing with an active second period.
Aho's power-play goal tied the game just 2:10 into the second period.
By the time McGinn's short-handed goal was recorded 51 seconds into the third period, Carolina appeared to be in control with a 4-1 lead.
Heinen's tally was the third of Boston's trio of third-period goals in a span of 1:17. With 8:39 remaining, he scored on a rush, taking a nifty pass from David Krejci and tying the score 4-4.
--Field Level Media
Boston | Carolina | |
David Pastrnak 4 | Points | Sebastian Aho 2 |
David Pastrnak 3 | Goals | Sebastian Aho 1 |
Brad Marchand 2 | Assists | Justin Faulk 2 |
David Pastrnak 1 | Power Play Goals | Sebastian Aho 1 |
N/A | Short Handed Goals | Brock McGinn 1 |
Tuukka Rask .879 | Save Percentage | Cam Ward .848 |
Tuukka Rask 29 | Saves | Cam Ward 28 |
Team | Shots | Goals | Power Play | Penalty Kill | Penalty Mins | Face Offs Won |
Boston | 34 | 6 | 1-4 | 3-5 | 10 | 32 |
Carolina | 33 | 4 | 2-5 | 3-4 | 8 | 51 |