Montreal (48-24-10) needed a win in regulation to have a chance to pass the Tampa Bay Lightning for second in the division and a home-ice advantage in the Eastern Conference First Round series between the teams. Brendan Gallagher and Jake Evans each scored, and Jakub Dobes made 21 saves for the Canadiens.
Matvei Michkov had a goal and two assists, and Oliver Bonk had a goal and an assist in his NHL debut for Philadelphia (43-27-12), which has won three consecutive games. Porter Martone also had a goal and an assist, Alex Bump scored, and Samuel Ersson made 27 saves.
Philadelphia played without several of its top players, including forwards Trevor Zegras, Owen Tippett and Travis Konecny, as well as defensemen Travis Sanheim and Rasmus Ristolainen after clinching third place in the Metropolitan Division and an Eastern Conference First Round series against the Pittsburgh Penguins with a 3-2 shootout win against the Carolina Hurricanes on Monday.
Martone made it 1-0 at 8:08 of the first period when he tipped Michkov's point shot between Dobes' pads.
Bonk, who was recalled from Lehigh Valley of the American Hockey League earlier Tuesday, put the Flyers ahead 2-0 at 14:42 when his wrist shot from above the right face-off circle went through traffic and past Dobes.
Gallagher cut it to 2-1 at 6:50 of the second period. He skated to the net and tipped in a centering pass from Kaiden Guhle to put it five-hole past Ersson.
Michkov put the Flyers up 3-1 at 13:52, locating a loose puck in front of the crease and whipping in a wrist shot with Dobes out of position.
Evans made it 3-2 at 19:49, diving into the crease to tap the puck past the goal line after Ersson stopped Arber Xhekaj's shot from the blue line but lost the rebound.
Bump put the Flyers ahead 4-2 at 12:00 of the third period. Canadiens forward Juraj Slafkovsky mishandled the puck in front of his own net, with Martone getting a stick on it and passing to Bump for the quick snap shot past Dobes.