Philadelphia (2-7-3) ended its five-game winless streak, while D.C. United (6-2-3), the Eastern Conference leader, had its eight-game undefeated streak stopped.
Fabinho sent in a cross in the 93rd minute that Sebastien Le Toux let play through his legs. Pfeffer settled the ball with his right and slotted a left-footed shot past goalkeeper Bill Hamid at the near post.
It was Philadelphia's first goal since April 25.
Pfeffer and Fabinho were both second-half subs. Fabinho was the first sub of the game in the 58th minute and Pfeffer entered in the 71st.
"I got myself in a good spot in the box and took a touch and finished it," said Pfeffer, from Philadelphia. "Came away with three points, I'm so happy."
Philadelphia goalkeeper Brian Sylvestre got his first MLS shutout in his second appearance.
All content copyright ©2015 Daily Journal, a division of Home News Enterprises unless otherwise noted.