All-Star Tim Thomas allowed a season-high six goals, making up for an off-night in the net by squaring off with Montreal counterpart Carey Price during a second-period fight that left the penalty boxes overflowing and the ice littered with equipment.
Michael Ryder had two goals, and Brad Marchand, Dennis Seidenberg and Adam McQuaid also scored for Boston, which beat its Original Six rival for the first time this season. David Krejci had three assists.
Max Pacioretty scored two of Montreal's four power play goals, and Brian Gionta scored his 200th NHL goal as the Canadiens lost in regulation for just the third time in 10 games.
P.K. Subban, Yannick Weber and David Desharnais added goals for Montreal.
Thomas stopped 27 shots. Price made 26 saves. The teams combined for 182 penalty minutes, with the Canadiens holding a 95-87 edge. Boston had 24 penalties, and Montreal was called for 21.
Ryder beat Price another time on a goal that was waved off because Marchand crashed into the crease; replays showed Weber pushed him there.
That wasn't the only contact the goalies saw as the teams played for the lead in the Northeast Division; with the win, Boston held off the Canadiens and extended its lead to four points. During a second-period brawl that left five Bruins and four Canadiens in the penalty box, Thomas sprinted down the ice and challenged Price.
The players spent more time shedding their gloves and masks than actually punching.
Another fight broke out with 41 seconds to play, with eight players squaring off - four of them receiving game misconducts. At the end, the Bruins had just five skaters left on the bench and Montreal six.
Marchand and Seidenberg scored 12 seconds apart to give Boston a 2-0 lead in what turned out to be a relatively tame first period. That was neutralized when Gionta scored 25 seconds into the second period and Subban tied it 8 minutes later.
Then things got weird.
In quick succession, the Bruins went ahead; Montreal tied it; Boston took the lead again and then made it 5-3 on Lucic's first goal - and Horton's third assist - with 7:29 left in the second. Five seconds after the faceoff, players began squaring off in the corner at the Canadiens' end and, after Price skated over, Thomas sprinted at his Montreal counterpart.
Just a punch or two later, Thomas was on the ice. And 12 seconds into the resulting Montreal power play, Desharnais cut the deficit to 5-4. But Lucic made it a 6-4 game two minutes later on a short-handed goal.
In all, the teams combined for eight goals in the second period - seven of them in a 6:19 span - as the game went from a 2-1 duel to a 6-4 shootout.
Pacioretty made it a one-goal game with 12:54 left. But just a minute after Ryder's would-be goal was waved off, he scored one that counted and restored Boston's two-goal lead.
Notes: Thomas is the first Bruins goaltender to get a fighting major penalty since Byron Dafoe in 2002. ... Montreal D James Wisniewski, who missed the previous two games with the flu, returned to the lineup. ... Bruins forward Tyler Seguin, the No. 2 overall pick in the draft, was a healthy scratch. ... It was Claude Julien's 300th game as Bruins coach, seventh-most on the team's career list.