Thomas, 12-2-1 with an NHL-best 1.46 goals-against average and .955 save percentage, helped Boston beat Philadelphia in their first meeting since May when the Flyers rallied from a 3-0 series deficit to edge the Bruins in the Eastern Conference semifinals.
Patrice Bergeron, Tyler Seguin and Milan Lucic scored to help Boston win for the second time in its last six games.
Bergeron opened the scoring on a power play at 5:40 of the first period. Flyers goalie Sergei Bobrovsky stopped Lucic's attempt, but defenseman Sean O'Donnell's clearing attempt went to Bergeron between the faceoff circles, and he fired a shot by Bobrovsky's right arm.
Seguin scored with 4:48 left in the first, taking a pass from Michael Ryder and finding a place at the top of the net for his fifth goal of the season and first since Nov. 17.
Thomas was especially sharp in a 16-save second period, when he turned away Danny Briere from point-blank range, stopped Hartnell on a wraparound attempt, and foiled Andreas Nodl streaking down the left side.
Thomas stopped Hartnell again on a breakaway, then had to stop him again when a tripping call on Andrew Ference gave Hartnell a penalty shot. The Flyers' left wing committed to a backhand attempt, and Thomas easily turned it away.
Lucic scored into an empty net with 1:48 left.
The Flyers lost for the first time in regulation since dropping a Nov. 18 game to Tampa Bay, 8-7. The Flyers again struggled on the power play, going 0 for 4 to drop to 2 for 37 in their last eight games.
NOTES: Bruins center Marc Savard (post-concussion syndrome) has resumed practicing with the team. ... Flyers goalie Michael Leighton (back surgery) is with Adirondack of the AHL on a conditioning assignment.