Harper hit two long home runs, giving him seven in his last 23 games for the NL East leaders.
Harper had his fifth career multihomer game. He is hitting .306 with seven home runs and 14 RBIs since Aug. 7, and went 6 for 12 with three homers in the series.
The All-Star outfielder missed 57 games with an injured left thumb before returning June 30.
“It’s significant that he feels good,” Nationals manager Matt Williams said. “You miss that kind of time, it takes time to get your rhythm and timing back.”
“His hand is getting stronger. It allows him to stay back and calm and keep his body down a little bit. We’ve seen that over the last couple weeks. It’s getting there,” he said.
Harper is hitting .268 with 10 home runs and 28 RBIs this year.
“I feel pretty good out there, trying to put together some good ABs and get my work in every day,” he said.
Nate Schierholtz also homered for the Nationals. They hit 10 home runs in the series, one short of the Safeco Field record for a three-game set established by Cleveland in 2009.
Washington has lost four of six. Seattle had lost three in a row, and had been 0-11 against the Nationals since the franchise moved from Montreal to Washington for the 2005 season.
The Mariners trailed 3-1 in the fifth when Dustin Ackley hit a three-run homer off Tanner Roark (12-9). It was his 11th homer this season.
Ackley also singled home a run, and tied his career high with four RBIs in a game. He is hitting .319 with 19 extra-base hits since the All-Star break.
Hisashi Iwakuma (13-6) picked up the win for the Mariners, who averted a three-game sweep.
Harper hit a 418-foot, solo homer in the second, the first run Iwakuma had allowed against National League teams in 23 innings.
Harper hit a 416-foot shot to straightaway center in the fourth.