Michael Taylor also homered and drove in two for Washington.
Doug Fister (4-6) picked up the win. allowing two runs and four hits in six innings.
Harper's first homer, a three-run shot, came off of Tom Koehler (8-7) in the fifth inning breaking a 2-all tie.
Harper then led off the eighth by smacking a first-pitch fastball from Sam Dyson deep to right field for his 29th home run of the season. It was his third multi-home run game of the season, first since hitting two against Atlanta on May 8.
Koehler pitched six innings and allowed five runs.