The Nationals let a five-run lead get away when the Cubs scored five times in the fifth, a big inning keyed by Anthony Rizzo's two-run blast.
Hairston, however, put Washington back in front in the seventh after Bryce Harper came through with a two-out double and Jayson Werth was intentionally walked. Hairston's homer to right, his ninth of the season, came off reliever James Russell (1-4).
Tanner Roark (3-0) gave up two runs over 1 2/3 innings, but was credited with the win by being the pitcher of record when the Hairston hit his home run.
Senate Democrats to pull all-nighter on climate change
Interpol investigating stolen passports on missing flight