Sean Kuraly scored the go-ahead goal, and Jaroslav Halak made 16 saves for the Bruins (5-1-1).
After scoring three goals in their first three games, the Bruins scored 17 goals while sweeping their four-game homestand.
"As a team, we think on the [defensive] side of the puck we've been playing well, and we just wanted to stick with that," Kuraly said. "We know we've got good players, a bunch of talent, goals will come. Sometimes you've just got to tell yourself, 'Stick with it.' And I think that's, as a team, what we've been doing is sticking with it. Our chances are coming, and they're starting to go in a little bit more."
Cody Ceci scored, and Tristan Jarry made 16 saves for the Penguins (4-3-1), who had their five-game point streak (4-0-1) end.
Boston has won 10 straight home games against Pittsburgh, including a 3-2 overtime victory Tuesday in the opener of the two-game set.
"We see Boston, they're faster, they're hungry and they win every battle in the corners," Penguins center Evgeni Malkin said. "… We need just to look in the mirror and fight every shift. It's not a pretty game right now. … We need to try to play simple and need to just work, work, work."
Chris Wagner put Boston ahead 1-0 at 6:10 of the first period. He intercepted a clearing pass up the middle and scored from the high slot.
Ceci tied it 1-1 from the top of the slot at 15:03 after winning the puck along the right boards. It was the defenseman's first goal with Pittsburgh.