Scott Hartnell, converting a pass from Kimmo Timonen (three assists), tied it at 3 with 3 minutes, 2 seconds left in regulation, and Claude Giroux won the thriller as he one-timed a feed from Danny Briere from the left circle with 1:31 remaining in overtime.
Jagr, who played briefly in just one of the previous five games, kidded that Briere and Giroux were playing "keep away," and he couldn't get the puck on the game's final shift.
"It's tough to go with two French guys," Jagr said with a smile. "They're passing to each other while I'm open for four minutes there. I've got to talk to Coach. I need another Czech guy there."
Giroux scored while the Flyers were on a four-on-three power play, created when Anaheim captain Ryan Getzlaf picked up a double-minor - one for tripping, the other for arguing the call. The winning goal was scored during the second of the penalties.
But the late theatrics wouldn't have been possible if not for Jagr, who had three points on the night and keyed a power play that had been 1 for 10 in the previous three games. The power play had struggled because it had lost its quarterback, Chris Pronger (knee surgery), and the 6-foot-3, 240-pound Jagr.
On Friday, the Flyers were 3 for 9 on the power play, spoiling the Anaheim coaching debut of Bruce Boudreau, whose first win was against the Flyers when he directed Washington in 2007.
"It's been a while since we made a difference," Giroux said of the power play.
The Ducks helped with their undisciplined play.
"You're not going to beat that club if you take  minors," Boudreau said. "They're the highest-scoring team in the league for a reason."
Jagr, 39, had the 116th two-goal game of his Hall of Fame career. It gave him 654 career goals, two shy of Brendan Shanahan for 11th place in NHL history.
On the game-winner, Ducks goalie Jonas Hiller "was cheating on Jags a little bit," Giroux said.
After failing to click on their first three power-play chances, the Flyers got into a rhythm with the extra skater, getting pucks to the net, finding lanes, and creating traffic in front of Hiller.
A lot of that could be attributed to Jagr, who had 16 shots on the night - 10 on goal, three that were blocked, and three that missed the net.
Contact staff writer Sam Carchidi at email@example.com or @BroadStBull on Twitter.