Mark Streit's goal with 2:50 remaining gave the Flyers their fourth consecutive win against the Penguins. Streit carried the puck around defenseman Kris Letang before shooting it through Marc-Andre Fleury's five-hole.
"It was another big game, it's always a big rivalry," Streit said. "It was like to the point where I really couldn't believe it. It's such a crazy game. We got the lead twice and then they scored and it was up and down and you're like, 'Wow, great, we got it,' and five seconds later they tie it up. So, it was a crazy game, but great for the fans.
"We got a little lucky at the end, but that's how it works in sports sometimes."
The Flyers will play the New York Rangers, the second-place team in the Metropolitan, in the first round of the Stanley Cup Playoffs.
"It's going to be a good series," Giroux said. "I think it's going to be key for us to play our best hockey right away. They kind of look like us a little bit, a complete team."
Letang tied this game 3-3 with 37 seconds remaining in the third period. He backhanded a shot past goalie Ray Emery from the crease for his first goal since having a stroke in late January. Letang's goal came less than a minute after Claude Giroux gave Philadelphia the lead by wristing a pass from Jakub Voracek past Fleury.
"I'm just trying to get back into it," Letang said. "The result is disappointing, but I think we played a good game overall. … I think if we go into the playoffs that way, we're going to win games."
Penguins forward James Neal tied it 2-2 with 5:07 remaining. Sidney Crosby lost control of the puck but whipped around to backhand a pass to Neal, who sent a wrist shot past Emery, who replaced Steve Mason to start the third period.
Mason sustained an upper-body injury in a collision with Pittsburgh forward Jayson Megna with 3:33 left in the second period. Mason, who made 21 saves on 22 shots, remained in net for the rest of the period but did not return to start the third.
Flyers coach Craig Berube said he was not sure of the severity of Mason's injury but expects him to be prepared to start Game 1 against the Rangers.
The Flyers needed more than 14 minutes to record a second-period shot but took full advantage by scoring on their first for a 2-1 lead.
Giroux slapped a shot from the boards into the crease, where Voracek and Scott Hartnell were screening Fleury. Voracek redirected the puck through Fleury's five-hole for his second goal of the game with 5:22 to go.
Pittsburgh had 12 shots and two power plays (one 5-on-3) before Philadelphia's goal.
"It's a typical Penguins game I think," Giroux said. "I think in the second period, they played a good game and we were waiting to see what they're doing and we kind of snapped out of it and started playing a little bit better."
Mason's most impressive save came 2:23 into the second period when stopped a few point-blank chances by Neal before the puck slipped out to Beau Bennett to the left of the net with Mason out of position. Mason stretched his right leg to place his skate on the post while reaching back with his glove to stop the puck along the goal line.
The Penguins scored first on Jussi Jokinen's 20th goal of the season.
Neal forced Wayne Simmonds to turn over the puck in Pittsburgh's zone before carrying it along the left boards through the neutral zone and slipping a pass to Jokinen between the faceoff circles. Jokinen wristed a shot over Mason's rising glove 2:00 into the game.
Jokinen has the second-highest goal total of his career, behind the 30 he scored in 2009-10 for the Carolina Hurricanes.
Philadelphia capitalized on its first power-play opportunity about two minutes later.
Giroux dove in front of the blue line to keep the puck in the Penguins zone and passed it to Voracek. Voracek skated through Penguins forward Craig Adams and diving defenseman Paul Martin to scored his 22nd goal of the season to tie the game with 2:51 remaining in the period.
Philadelphia ends the regular season Sunday at home against the Carolina Hurricanes. Pittsburgh hosts the Ottawa Senators.
Crosby wants the Penguins to bring the same commitment they had Saturday into their season finale. The Metropolitan Division-champion Penguins learned Saturday night that they will face the Columbus Blue Jackets in the first round.
"I think just to follow up this performance from today. As a whole, we want to feel good about our game," Crosby said. "I think there were some things from today that I think were good. For a game that doesn't move us anywhere, it didn't have a lot of bearing on us, we came with the right attitude, the right mindset."