Johnson (7-7) struck out nine and allowed one earned run on five hits. The right-hander -- who had been the subject of intense trade-deadline speculation -- didn't issue a walk while tossing 76 of his 115 pitches for strikes and lowering his ERA to 3.85.
Steve Cishek got the final out for his sixth save as Miami rebounded from a 7-4 loss in the first game of the twin bill.
The Marlins erased a 1-0 deficit in the sixth with three runs, highlighted by Lee's two-run single, and the first baseman added an RBI groundout in the eighth to make it 4-1.
Jose Reyes went 3-for-5 with two runs scored for Miami.
Gio Gonzalez (13-6) absorbed the loss for the National League East-leading Nationals, yielding four runs on nine hits over eight frames.
Ryan Zimmerman drove in Washington's only run.