The Nationals need 11 victories in their last 19 games to reach 100 for the season.
With Stephen Strasburg having been shut down for the remainder of the season, Lannan (3-0) moved into the rotation for his third start of the campaign. He has won them all.
Lannan allowed five hits through 5 1/3 innings while throwing 81 pitches. Drew Storen came on in the ninth with two on and two out and protected the shutout by getting Daniel Murphy on a fly ball to center.
Washington, which began the game with a National League-best 3.31 team earned run average, won its third straight.
Matt Harvey (3-5) gave up the first home run and four other hits while striking out 10 over five innings to take the hard-luck loss.
Video of Victoria’s Secret models trying to 'twerk' hits Instagram
Megyn Kelly: Santa Claus and Jesus are both white men