Travis Konecny had a goal and an assist, and Philippe Myers had three assists for Philadelphia (16-7-5), which is 6-0-1 in its past seven games. Carter Hart made 27 saves.
"Everyone has a lot of faith in each other," Flyers forward Kevin Hayes said. "It's probably the tightest team I've ever played with. Our leaders lead from the front, and it's easy to follow. It's a lot of fun to be on the ice, it's a lot of fun to go to battle every night, and even if the other team scores, we're not really panicked. And it shows."
WATCH: [All Maples Leafs vs. Flyers highlights] | Matthews: Maple Leafs 'kind of just quit' in loss
Frederik Andersen made 23 saves on 28 shots for Toronto (13-12-4), which has lost two of its past three games.
After Maple Leafs defenseman Travis Dermott tied the game 1-1 at 8:38 of the third, Claude Giroux scored to give the Flyers a 2-1 lead at 10:00 with the first of the five goals in 9:33. Konecny made it 3-1 with his 10th of the season at 16:32, and Joel Farabee scored into an empty net to make it 4-1 at 17:54.
"We tie it up, give up a goal, feel like we're still kind of in it," Toronto forward Auston Matthews said. "You got a chance to pull the goalie, still got a couple minutes left. But we let in that empty-net goal and we can't just fold like that. It's unacceptable to do that to our starting goalie, the guy that's stolen games for us. He has been a brick wall for us all year. That's just unacceptable on our part. We can't just fold."
Maple Leafs coach Sheldon Keefe said he addressed the final minutes of the game with them.
"Normally, I would not go in after a loss or a game like this, but I felt that it was important to address that situation," Keefe said. "We want to be a team of high character and that cares for one another. I thought we just left our goaltender completely out to dry there and stopped playing. That's not a good sign for our group. Hopefully, it's sort of the shake-up that we need."
Giroux scored the game-winning goal after Myers tipped the puck away from Maple Leafs forward Andreas Johnsson along the wall on the right side of the Toronto zone. It rolled behind the net, and Konecny backhanded a pass in front that Giroux one-timed past Andersen.