Scherzer struck out nine and walked three in five innings, allowing two unearned runs and three hits.
In typical Scherzer fashion, he was more concerned about the three walks, saying he was ''inefficient'' against the Cardinals lineup.
''When you're walking three guys, that's just inexcusable,'' Scherzer said. ''I think I fell behind quite a few guys as well. That's just something I know I have control over. I've got to be better at pounding the zone and being in those 1-2 counts and not being in those 2-1 counts.
''It's something that can be easily fixed. At the same time, you've got to like where all of my pitches are at, how everything's moving. It's something I can build off of.''
After the pitching matchup was announced Wednesday night, Scherzer and Wainwright exchanged a few friendly texts.
''Yeah, that happened,'' Scherzer said. ''We both realize we have two starts left . hey, let's go at it. Bring your 'A' game type of stuff. That's what makes it fun. He's a competitor as well. That's what you enjoy.''
Wainwright gave up four runs and seven hits in 4 1/3 innings, struck out four and walked one.
Michael A. Taylor hit a two-run double and a two-run homer for the Nationals. Anthony Rendon drove in two runs with his third double in two days.
Scherzer struck out eight different Cardinals.
Wainwright was relieved by Nick Maness, who gave up two doubles, Taylor's homer and a single among his first four batters.
Cardinals: Despite being touched for four runs, Wainwright was pleased with his outing.
''I felt good out there,'' he said. ''I've still got to sharpen just a bit, but things are falling into place. Obviously, the results sometimes don't show it, but I threw some nice pitches out there. That's a tough lineup over there. It's good to face a lineup like that. It gets you ready.''
Nationals: Washington manager Dusty Baker was happy with the way Scherzer was able to get through the day without being at his best.
''He was getting underneath his breaking ball a little bit. He wasn't sharp, but he was sharp enough to get them out.''
TAYLOR HAVING BIG SPRING
Taylor now leads the Nationals in home runs (four) and RBIs (13) this spring while batting .486 (16 for 37), but is still slated to be the team's fourth outfielder behind Ben Revere in center field.
''Both of them are having great springs. They do what they're supposed to do. Ben's supposed to get on base and score runs. Michael has the capability of doing everything,'' he said. ''But we can only play three at a time. There isn't a quarterback controversy. It is what it is.''
Earlier this spring, Cardinals manager Mike Matheny said Matt Holiday was a ''viable option'' at first base. Asked about the possibility of Kolten Wong batting leadoff this season, Matheny not only used the same phrase, he jokingly suggested a new line of clothing.
''Viable option,'' Matheny said. ''Let's get a T-shirt made.''