Andrei Markov had a goal and an assist for Montreal (10-1-1), which leads the NHL with 21 points. Alex Galchenyuk and Phillip Danault also scored for the Canadiens.
Shayne Gostisbehere had a goal and an assist, and Chris VandeVelde, Claude Giroux and Travis Konecny scored for Philadelphia (6-6-1), which lost for the first time in four games.
Flyers goaltender Michal Neuvirth made 12 saves in his fourth straight start. Philadelphia outshot Montreal 38-17, including 15-3 in the second period and 14-6 in the third.
"We were playing some good hockey," Giroux said. "We were feeling good about our game, and even if we were losing, I think we were happy about our game, the way we were playing. We wanted to keep playing like that, and we thought if we keep playing like that, we were going to win the game. But if we play like we played tonight, we're going to win a lot of hockey games."
Galchenyuk put the Canadiens ahead 3-2 when he scored on Montreal's second shot of the second period at 18:38. Danault increased the lead to 4-2 at 3:52 of the third.
Giroux scored on a power play at 9:16 to draw Philadelphia within 4-3. His third goal of the season came 45 seconds after Montreal right wing Andrew Shaw was given a double minor for high sticking at 8:31.
Plekanec made it 5-3 when he put a slap shot past Neuvirth.
Konecny scored the Flyers' second power-play goal of the period to make it 5-4 with 3:44 remaining.