The Bruins appeared to take a 2-0 lead at 8:12 of the second period when McAvoy scored. The call was overturned after Nashville used a coach's challenge for goaltender interference.
Johansen tied it 1-1 at 13:01 of the second period. After Craig Smith made a cross-ice pass off the right wall, Johansen scored on a one-timer from near the right face-off dot.
Bergeron scored his second goal, 300th in the NHL, on a power play at 1:44 of the third period for a 2-1 lead. Pastrnak and Danton Heinen created havoc around Rinne and Bergeron scored on a rebound from the slot.
"I actually didn't know," said Bergeron, who played his 983rd NHL game. "And the ref came with the puck on the bench and I was like, '300? I actually had no idea.' I was like, 'No, I don't think it's me, it's someone else.' So that's how I keep up with my stats."
Marchand said, "I was right beside him. I should know that, I watch his stats every day. But it's just another accolade for him and another great accomplishment. So very happy for him."
Turris scored at 9:17 with a wrist shot from the top of the right circle to tie the score at 2-2.
Marchand's power-play goal at 11:23 of the third period assisted by Bergeron put the Bruins ahead 3-2.
Pastrnak scored on a one-timer off a pass from Marchand at 14:09 for a 4-2 lead. Bergeron had an assist.
Sean Kuraly scored an empty-net goal at 18:01 to make it 5-2.