Scott Hairston had an RBI double and a single for Washington, which has won nine straight against the Mets going back to last season.
Nationals starter Tanner Roark (3-1) pitched five innings, giving up two runs on four hits.
Ross Detwiler, Drew Storen, Tyler Clippard and Rafael Soriano each pitched one inning. Soriano got his ninth save after walking two batters with two outs before Jayson Werth made a jumping catch against the right field wall on a drive by Daniel Murphy in the ninth.
The Mets snapped a 22-inning scoreless streak, their second longest of the season, with two runs in the fifth.
Jonathon Niese (2-3) took the loss, allowing five runs, three earned, in four innings. It was Niese's shortest outing since June 20, 2013 at Atlanta, when he left after 3 1-3 innings due to injury.
The Mets' defense hurt Niese early as the first three Nationals hitters of the game reached safely and scored. After Denard Span singled, third baseman David Wright misplayed Anthony Rendon's grounder for an error.
Werth then singled home Span, and Washington added two more runs on a sacrifice fly by Wilson Ramos and a fielder's choice grounder from Moore that might have been a double play. But the ball was bobbled briefly by second baseman Murphy.
In the third, Hairston doubled home Ramos and scored on a single by Moore to make it 5-0.
Following consecutive shutout losses to the Yankees and four scoreless innings against Roark, the Mets finally broke through.
Lucas Duda opened the fifth with a single and went to third on Anthony Recker's double off the wall. Duda scored on a groundout by Ruben Tejada and Eric Young's double brought home Recker to pull New York within 5-2.
The game was delayed briefly when a fan came onto the field near the Nationals' dugout and ran from first base around to home with one out in the ninth. He was tackled by a security person just behind home plate, drawing cheers from the crowd.
NOTES: Washington selected the contract of 1B Greg Dobbs and optioned C Sandy Leon to Triple-A Syracuse prior to Friday's game. Dobbs, released by the Marlins on May 6, was signed as a minor league free agent Monday. To make room on the 40-man roster, the Nationals put Syracuse outfielder Eury Perez (broken toe) on the 60-day DL. . Manager Matt Williams said two Nationals on the DL, LF Bryce Harper (left thumb strain) and 3B Ryan Zimmerman (right thumb fracture), have doctor appointments next week and will get progress reports. . Mets RHP pitcher Jenrry Mejia, being eased into the closer's role, was unavailable after pitching the ninth inning Thursday night. ''He hasn't been back-to-back in four years, so we've got to be careful,'' Collins said, adding Mejia will pitch consecutive games soon. . New York's Bartolo Colon (2-5, 5.84) opposes Gio Gonzalez (3-3, 3.97) Saturday.