Washington used an 11th-inning grand slam by Ian Desmond to take the final game of the series and move ahead of Philadelphia into sole position of second place in the National League East.
After Michael Young put the Phillies ahead in the first inning with a two-run home run, Kyle Kendrick pitched 7 and two-thirds impressive innings.
However, Jonathan Papelbon blew his second save in three nights when he gave up a two-out base hit to former Phillie Jayson Werth, which tied the game at two.
Gio Gonzalez also had an impressive pitching performance, giving the Nationals seven strong innings after early struggles.
Drew Storen earned the win for Washington, while Michael Stutes was credited with the loss for Philadelphia.