In his fourth at-bat he produced an RBI groundout. He finished the game 3-for-4 with five RBIs.
Harper hit a 393-foot solo shot leading off the second inning, a 442-foot, two-run drive in the third and a 445-foot bases-empty shot in the fifth, the last two reaching the second deck. Each of the home runs came on the second pitch of the at-bat offTom Koehler(2-3).
Harper connected in the fifth inning with such force that Marlins outfielderGiancarlo Stantonstood motionless in right field, looking toward the infield as the ball soared into the seats behind him.
"That's how I should be. Plain and simple," Harper said of his big day. "That's how I expect myself to play. Of course you're not going to do that every single day. You're not going to go out there and hit three homers, drive in five. But that's the type of player I need to be."
Harper entered the game 1-for-17 in May and 2-for-15 against Koehler, although one of those hits was a home run.
"I made three mistakes against him and he hit the ball hard three times," Koehler said. "Fastball away that stayed up, fastball in that was up and came back over the plate and a slider that just kind of spun up there."
The 22-year-old slugger now has eight home runs this season.
Harper, in his fourth major league season, previously hit two homers in a game on five occasions, but admitted he was hoping to become the first Nationals player to ever hit four home runs in a game.
"Going up there against [relieverSam] Dyson, runner on third base, you're trying to get that run in," Harper said. "Of course you want to try to get that fourth homer. That's something that would've been very cool to get."
He became the fourth player in Nationals history to accomplish the three-homer feat, joining Alfonso Soriano, Adam Dunn and Ryan Zimmerman, who was the last to do it in May 2013.
Harper is the second player this season to hit three home runs in a game, joining the Dodgers' Adrian Gonzalez, who accomplished the feat on April 8 against the San Diego Padres.
To celebrate, Harper joined some of his teammates, including pitchersMax Scherzer and Gio Gonzalez, in attending Game 4 of the Washington Capitals' playoff series against the New York Rangers.
The Associated Press contributed to this report.
Harper connects for three home runs
Washington Nationals right fielder Bryce Harper homers in each of his first three at-bats against the Marlins.