Malkin's goal clinched the win after Sidney Crosby had broken a 2-2 tie less than 2 minutes earlier.
The Penguins will host the Flyers in the opener of their opening-round series next week.
Marc-Andre Fleury started in goal for the Penguins, but played only 32 minutes in a game that had no bearing on the final standings. Fleury gave up a goal on 15 shots before Brent Johnson replaced him.
Brayden Schenn and Jaromir Jagr scored for Philadelphia, which had won its five previous trips to Pittsburgh. Sergei Bobrovsky gave up four goals on 23 shots to take the loss.
Ohio bar shooting arrested, charged with murder
LGBT community has 'bullied the American people': Bachmann