"It is just obvious he wants to beat them up," said Scherzer, with a smile. "It is special for him to be able to do that."
Scherzer allowed just two hits and no runs with 10 strikeouts in 7 1/3 innings and Murphy hit two homers as the Nationals beat the Mets 4-2, sweeping the three-game series against the defending National League champions.
"It is big to sweep these guys," Scherzer said. "I know it is only June. It is good for us to come out and have a good team win."
Murphy hit a shot solo in the second and a two-run homer in the eighth to lift his average to .352 as he tied a career-high with 14 homers this year. He is hitting .429 against the Mets this year in nine games, with four homers.
"That was Murphy against his former team," said Dusty Baker, the Washington manager. "That last two-run homer was huge. You know your former team. He is very familiar with the Mets. He has learned to hit the ball out of the ballpark. It is great to have him on this team."
Oliver Perez came on in the eighth to face pinch-hitter Curtis Granderson, who singled to put two runners on with one out and the score 2-0. The Nationals brought on Blake Treinen, who retired pinch-hitter Travis d'Arnaud on a grounder. Baker then called on Shawn Kelley, and Alejandro De Aza struck out swinging to end the inning.
Murphy then hit his second homer of the game, a two-run shot in the last of the eighth off Sean Gilmartin to pad the margin to 4-0.
The first-place Nationals (47-32) are now six games ahead of the third-place Mets (40-37), who have lost eight of their last 12. Washington has won four in a row after a seven-game losing streak.
"When you're facing a great pitcher like Max, you have to look at everything, but we're just not giving ourselves chances," Mets manager Terry Collins said.
Scherzer (9-5), who threw two no-hitters last season, had allowed five runs in six innings in his last outing on Friday in Milwaukee in a 5-3 loss. He threw 108 pitches and walked one against the Mets.
The right-hander has not lost two games in a row this year. The St. Louis native retired 18 in a row before Nimmo hit a clean single up the middle with one out in the eighth -- the second hit of the game for the Mets.
"I was able to rebound from that start in Milwaukee," Scherzer said. "I feel I am more of a complete pitcher now."
The losing pitcher was Logan Verrett (3-5), who gave up four hits and two runs in five innings before Antonio Bastardo threw two scoreless frames.
The previous time New York scored in the series was two runs in the third in the first game of the set Monday. The Mets were shut out 5-0 on Tuesday by starter Lucas Giolito and four relievers. Scherzer has fanned at least 10 batters in seven games this season, including his last four outings. He has 41 strikeouts and four walks in those four games.
The Nationals took a 1-0 lead in the second on a solo blast by Murphy, his 13th homer of the season. Murphy entered the game with a .349 batting average, the best mark in the National League.
"He's doing damage against everyone," Collins said. "You can't miss on the inner part of the plate against Daniel Murphy. You can't make mistakes when you have a guy as hot as Dan is right now."
Murphy hit a career-high 14 homers last year for the Mets during regular-season play before signing with the Nationals as a free agent in January.
The homer came against Mets starter Verrett, who threw an inning out of the bullpen Sunday in Atlanta. "I felt like I kept us in the game. I gave us a chance to come back. I was able to keep us there, so I'm overall happy with it," Verrett said.
Scherzer struck out a pair of batters in the first, second and third frames and one each in the fourth and fifth. The Mets' only hit through five innings came on Asdrubal Cabrera's one-out single in the second. Cabrera was a member of the Nationals in 2014.
"Thank God for Scherzer. He was ready from the first pitch," Baker said.
NOTES: Washington RHP Max Scherzer threw a no-hitter against the Mets in New York on Oct. 3, 2015. ... Nationals LHP Gio Gonzalez (3-7, 4.73 ERA) will face Cincinnati Reds RHP Brandon Finnegan (3-6, 3.83) on Thursday in the opener of a four-game set in Washington. ... Mets LHP Steven Matz (7-3, 3.29) will face the Chicago Cubs and RHP John Lackey (7-4, 3.29) on Thursday in New York. ... The Nationals entered Wednesday with a team batting average of .277 since June 1, the best mark in the National League. ... Washington LF Jayson Werth was hitting .348 with 18 walks since June 7. ... The Mets have signed INF Peter Alonso, their second-round pick in the First-Year Player Draft out of the University of Florida. He will report to Class A Brooklyn on the New York-Penn League.