The Bruins got on the board first, at 4:34 of the opening frame. It was a bit of a fluke goal, as Tyler Bertuzzi's attempt to center the puck from behind the goal line deflected off a Montreal player's stick before bouncing off Allen and in.
Boston doubled its lead later in the period when Connor Clifton sprung Jake DeBrusk, who broke free through two Montreal defenders and beat Allen to make it 2-0 at 13:38.
The Bruins got in some penalty trouble late in the period, with A.J. Greer getting a five-minute major and a 10-minute misconduct for cross-checking Mike Hoffman.
The Canadiens capitalized on the major penalty when Nick Suzuki's one-timer beat Boston starter Jeremy Swayman for his 22nd of the season.
The goal was scored with 19 seconds left in the period, with assists from Denis Gurianov and Kirby Dach.