The Nationals right-hander struck out a season-high 14, and Washington defeated the Dodgers 2-1 at Dodger Stadium.
Scherzer, the 2016 National League Cy Young winner, gave up an unearned run in the first inning and allowed three hits with two walks in seven innings. Strikeouts accounted for nine of the initial 10 outs he recorded, and he retired the final 10 batters he faced.
Scherzer (7-3) threw 105 pitches, 73 strikes. Yasmani Grandal and Cody Bellinger each whiffed three times against him.
"Tonight, I had a real good feel for my slider," said Scherzer, who registered his fifth career game with 14 or more strikeouts and no earned runs allowed, the fifth most all time behind Randy Johnson (19), Nolan Ryan (16), Pedro Martinez (eight) and Roger Clemens (seven). "I was able to throw it exactly where I wanted to, in the zone, out of the zone, flatten it out against the lefties.
"It gave (catcher Matt) Wieters back there a lot of options of calling a (pitch). He was calling a great game. We were working with a fastball, changeup off that. And when he gets hot with his fingers, man, it's great to be back there pitching."
It marked the 55th time Scherzer has fanned at least 10 batters in a game, the most among active pitchers. He has six such outings this season.
"He struggled some early and then he found his control in the middle innings," Nationals manager Dusty Baker said. "Boy, he was great. It was a great game to watch, and you know whoever was pitching against him was going to pitch their best game. But Max wasn't going to give up."
Washington reliever Oliver Perez worked a 1-2-3 eighth before rookie closer Koda Glover sealed the deal with a scoreless ninth for his eighth save. After Glover fanned Yasiel Puig for the final out, the two players exchanged words, causing both benches to clear without much of an incident.
"Tempers flared a little bit," Glover said. "It is what it is. I don't have any hard feelings toward him. He was staring at me, and I didn't like it."
Puig wasn't available for comment.
A sacrifice fly by Daniel Murphy in the fourth inning was the difference for the Nationals (37-20), who have captured three consecutive wins and are 7-1 during their current nine-game road trip.
Dodgers starter Brandon McCarthy delivered a solid effort Tuesday but came up short. McCarthy (5-3) allowed two runs on three hits with four strikeouts and two walks in seven innings.
"I'm still really frustrated about the run in the first and making some really bad mental errors there and letting that run score, but from that point on, I felt like the quality was pretty good and I made the pitches I needed to make," said McCarthy, who is 3-1 with a 2.83 ERA at home this season.
The Dodgers (35-25) lost their third in a row.
"It was very fun baseball game to watch, two guys going at it and pitching really well," Dodgers manager Dave Roberts said. "Scherzer is one of the best in the game."
NOTES: Dodgers 3B Justin Turner (strained right hamstring) will participate in a simulated game Wednesday. Turner, who hit in the cage and performed fielding drills before Tuesday's contest, will be re-evaluated following the session and considered for reinstatement from the disabled list Friday. ... Nationals 3B Anthony Rendon, who went 1-for-3 with a walk, has hit safely in 11 of the past 13 games, batting .380 during that stretch. ... The Dodgers struck out a season-high 17 times, the most they have fanned since Sept. 9, 2016, against the Miami Marlins. ... Washington is 21-11 on the road this season, the second-best mark in the National League, trailing the Colorado Rockies (21-10). ... A crowd of 44,250 attended.