With the victory, Washington remained eight games behind Cincinnati, which won 4-3 in 10 innings against the Dodgers, for the second National League Wild Card spot. There are 21 games remaining in the regular season.
"Good game to come back after last night and get a win," Zimmerman said. "Tanner threw the ball great, scored some runs early for him and good way to answer what happened last night."
Washington opened with three consecutive knocks off right-hander Nathan Eovaldi (3-6) to take a 2-0 lead in the first.
Denard Span, who was a late scratch for the series opener, singled to left to extend his career-high hit streak to 18 games.
Zimmerman followed with a two-run blast to center on a 1-2 pitch. It was initially ruled a double before crew chief Gary Cederstrom reviewed the play and overturned the call. The ball, which traveled 401 feet, hit the base of the home run sculpture, just above the center-field wall.
Two innings later, Zimmerman led off the third with a first-pitch dinger for his 19th home run of the season and 21st against the Marlins in his career, tops against any team.
That marks 12 career multi-homer games and the second in 2013 for Zimmerman.
Wilson Ramos' one-out, two-run single off the wall in right drove in Adam LaRoche and Ian Desmond to push the lead to 5-0. Washington recorded nine hits through three innings, chasing Eovaldi.
Span produced a sacrifice fly off right-hander Sam Dyson with one out in the sixth. LaRoche added an RBI double against right-hander Chris Hatcher in the seventh.
Tyler Moore, who replaced an injured Bryce Harper in the lineup 10 minutes before first pitch, drove in a pair of runs with a two-out single in the ninth to cap the scoring.
Every batter in the lineup picked up at least one hit, as the team punched in 16 total. The Nationals have scored five runs or more in 13 of 27 games since Aug. 9.
"They've got some guys in there who can do some damage, especially if you don't get the ball down in the zone," Marlins manager Mike Redmond said. "They've got guys who can put it in the seats. You've got to execute. You've got to get ahead, and make pitches. We just weren't able to do that."
Nationals manager Davey Johnson, meanwhile, found a new arm to place in the rotation as the season winds down.
Roark (5-0), who made the most of the opportunity, didn't allow a base hit until Chris Coghlan's single to left to start the fourth.
After Donovan Solano lined out, Christian Yelich singled to right to set up runners at first and second. Roark induced a 4-6-3 double play off the bat of Giancarlo Stanton to end the threat.
Over six innings, the 26-year-old threw 71 pitches -- 47 strikes -- with four strikeouts. He scattered four hits -- all singles.
In 33 games (11 starts) at Triple-A Syracuse, Roark went 9-3 with a 3.15 ERA. In his previous nine big league relief appearances, he posted a 4-0 record and 1.19 ERA.
"I knew I had something," Johnson said of Roark. "He's got great command and he's made quality pitches out of the 'pen. I see it from where I'm sitting and even with talking to [Wilson] Ramos -- he loves to catch him because he hits his spots. It's one thing to have good stuff, but best thing in the world is to have that good command. He throws it like Satchel Paige -- 'Be where I want it to be.'"
Right-hander Ross Ohlendorf gave up a pair of runs on three hits in the seventh, while relievers Tyler Clippard and Drew Storen pitched scoreless frames.
Washington clinched its first season series from Miami since 1998, when the organization was the Montreal Expos.
"It definitely feels good," said Roark, who has not given up a run in nine innings against the Marlins this season. "We have great defense behind us, so that's great, too. Keep attacking and going at guys and forcing them to swing.
"Like I've been telling the guys since I've been up here, 'Just keep going at guys, keep attacking and don't give in to anybody.'"