Desmond singled in the first inning to put the Nationals ahead 2-0 then made it 5-1 with his single in the seventh, helping end the Pirates' four-game winning streak.
Denard Span and Jayson Werth also had two hits for the Nationals, who scored just seven runs during their skid.
Doug Fister (2-1) allowed one run and six hits in 5 1-3 innings with four strikeouts and no walks. He has given up two runs in 17 1-3 innings in his past three starts. Rafael Soriano pitched a perfect ninth for his 11th save.
Francisco Liriano (0-5) is winless in 14 consecutive regular-season starts, dating to last Sept. 10 when he won at Texas. He gave up four runs, six hits and four walks in five innings while striking out five.
Neil Walker had three hits for the Pirates.
Josh Harrison hit his third home run and Ike Davis also had two hits.
The Nationals jumped on Liriano for two runs in the first inning. Span led off with a double and later scored on a wild pitch. Desmond followed with his first RBI single.
Washington doubled its lead to 4-0 in the fifth when Anthony Rendon hit a run-scoring triple and scored on another wild pitch by Liriano, who won 16 games last season.
Harrison led off the sixth inning with his home run, a drive into the visitors' bullpen in center field, but the Nationals got the run back in the seventh on a second run-scoring single by Desmond.
Davis singled in a run in the eighth to draw the Pirates within 5-2.
The Nationals went 3 for 12 with runners in scoring position after going 2 for 27 in those situations in the previous four games. Washington is 21-1 when scoring four runs or more and 4-21 when it doesn't.
NOTES: The Pirates plan to recall RHP Brandon Cumpton (0-1 4.26) from Triple-A Indianapolis on Monday to start against Mets RHP Jacob DeGrom (0-2, 2.77) at New York. Cumpton, a rookie who made two starts for Pittsburgh earlier this season, will take the rotation spot of LHP Wandy Rodriguez, who was designated for assignment Thursday. ... Washington activated 1B Adam LaRoche from the 15-day disabled list before the game and he batted cleanup. LaRoche had been out since May 10 with a strained right quadriceps. ... Nationals 2B Danny Espinosa got a day off after going 4 for 36 (.111) with 16 strikeouts in his previous 10 games. ... Washington hosts the Miami Marlins on Monday with RHP Tanner Roark (3-2, 3.42) facing RHP Nathan Eovaldi (3-2, 3.41).