Morgan Geekie had a goal and an assist, and David Pastrnak and JJ Peterka each had two assists for the Bruins (12-4-1), who have won three straight and five of seven. Michael DiPietro made 16 saves.
Justin Brazeau and Nick Robertson scored, and Kaedan Korczak had two assists for the Penguins (5-9-2), who have lost four in a row (0-3-1). Arturs Silovs made 18 saves.
Brazeau put Pittsburgh ahead 1-0 on its first shot on goal at 9:04 of the first period, dropping to one knee in the right face-off circle for a snap shot set up by Hendrix Lapierre below the goal line.
Boston then scored three goals in 6:50.
Zacha tied it 1-1 at 12:07 on a wrist shot over Silovs off a pass from Pastrnak through the crease.
Mark Kastelic gave the Bruins a 2-1 lead at 15:04 with a deflection in the slot on a point shot from Frederic Brunet.
Elias Lindholm made it 3-1 at 18:57. After intercepting a pass from Penguins defenseman Erik Karlsson in Pittsburgh's zone, he froze Silovs with a shot fake and slid a shot under his glove.
Robertson cut it to 3-2 at 7:57 of the second period, redirecting a shot from Korczak for his team-leading seventh goal.
Zacha scored again, extending the lead to 4-2 at 14:24 with a wrist shot off a pass from Peterka on a 2-on-1.
Geekie pushed it to 5-2 on a breakaway at 16:57, taking a pass from Hampus Lindholm during a Pittsburgh line change to go in alone for a wrist shot. Geekie has scored in three straight games.
Fraser Minten scored with a snap shot on a 2-on-1 at 8:39 of the third period for the 6-2 final.
Bruins forward James Hagens left early in the third period after taking a crosscheck to the back from Penguins defenseman Samuel Girard.