Patrice Bergeron scored the decisive shootout 2, at TD Garden.
Boston jumped out to a 2-0 lead in the first period behind goals from Chris Kelly and Tyler Seguin, but the Flyers battled back, tying the game on Jakub Voracek's deflection with 4:17 remaining in regulation.
In the shootout, Seguin copied teammate David Krejci and beat Philadelphia's Ilya Bryzgalov high to the glove side. Like Boston, the Flyers' first two shooters, Matt Read and Claude Giroux, both scored on Bruins netminder Tim Thomas.
Bergeron then beat Bryzgalov low to the blocker side, and Thomas denied Danny Briere to snap Boston's four-game losing streak.
Thomas finished with 27 saves for the Bruins, who moved one point ahead of Ottawa for first place in the Northeast Division. The Senators host Toronto this evening.
Bryzgalov made 31 saves but his seven-game winning streak game to an end. He suffered his first loss since February 28 at San Jose.
Kelly buried a rebound of a Benoit Pouliot shot in the slot 6:23 into the game, and Seguin converted Bergeron's behind-the-net feed with 2:53 remaining in the first.
Philadelphia got on the board via the power play, as Read redirected Briere's shot from the left point at 9:16 of the second period. It was the 20th goal of the season for Read, making him the fourth Flyer to reach the mark.
The Bruins improved to 32-0-0 in games in which they have a two-goal lead this season...Boston is now 10-1-1 against Philadelphia since blowing a 3-0 series lead to the Flyers in the 2010 playoffs and the stretch includes last year's second-round playoff sweep...Defenseman Matt Carle picked up his 199th career point with the secondary assist on Read's tally...Philadelphia's Andreas Lilja and Maxime Talbot both left the game. Lilja took a puck to the neck, while Talbot departed with an upper-body injury. He appeared to get hurt in a second-period fight with Boston's Johnny Boychuk.