Lester (3-4) turned in his longest outing of the season, allowing six hits while striking out seven without a walk. Lester hit his fourth career homer and added a single for his fourth career multi-hit game.
Soto continued his torrid post-All Star game pace, going 3-for-4 with five RBIs and three runs scored. He's 10-for-17 (.588) with five homers, 11 RBIs and eight runs scored in four games since the break.
Trea Turner drove in four runs with a homer and a triple as Washington began a stretch of six games against the last-place Marlins and the Baltimore Orioles.
Miguel Rojas had a home run among his three hits for the Marlins, who were playing without several regulars. Miami lost its third straight game.
Ross Detwiler (1-1), starting a bullpen game for Miami, was lifted with no outs in the second after allowing eight runs on seven hits, four of them home runs.
The Nationals opened the game with four straight hits off Detwiler. Alcides singled, Turner tripled, and Soto and Josh Bell followed with back-to-back homers.
Tres Barerra hit his first career homer leading off the second, and Turner added a three-run shot later in the inning, ending Detwiler's night.
The Nationals recalled OF Andrew Stevenson from Triple-A Rochester and optioned RHP Andres Machado to Rochester.
Marlins: Placed infielder Jazz Chisholm Jr. (left shoulder contusion) and infielder/outfielder Garrett Cooper (left elbow strain) on the 10-day injured list. The Marlins recalled outfielder Lewis Brinson and selected the contract of RHP Andrew Bellatti from Triple-A Jacksonville.
Nationals: RHP Stephen Strasburg (neck strain), who felt discomfort after a July 9 simulated game, threw a 32-pitch bullpen session. "We'll see how he feels tomorrow, but he threw the ball well," manager Dave Martinez said.
Marlins: All-Star rookie LHP Trevor Rogers (7-6, 2.31) makes his second start of the season against the Nationals. On May 2, he took the loss, giving up three runs on four hits over five innings.
Nationals: RHP Paolo Espino (2-2, 3.33) makes his sixth start and 22nd appearance of the season, filling in for RHP Joe Ross (right elbow inflammation).