The Major League Baseball Players Association had filed a grievance on Harper's behalf over whether he should be able to void the 2015 terms in the final season of a $9.9 million, five-year contract he signed when drafted.
An arbitrator hearing would have taken place Tuesday if Harper and the Nationals hadn't settled.
The agreement comes two days after Harper didn't show up for a scheduled appearance at the NatsFest fan festival, which prompted general manager Mike Rizzo to say he was "disappointed" by the outfielder's absence.
Harper, who turned 22 in October, is already a two-time NL All-Star and one of the Nationals' most popular and marketable players.
He's coming off an injury-interrupted season in which he batted .273 with 13 homers and 32 RBIs but thrived in Washington's NL Division Series loss to the Giants. Harper hit .368 with three homers and four RBIs in that four-game series.
He lost time in the first few months of the season after having surgery on a torn thumb ligament suffered when he slid into third base during a game on April 25. Harper wasn't back in the lineup until June 30.
Harper hit career highs during his first season in the majors, belting 22 homers and 59 RBIs in a 2012 campaign that saw him win the National League Rookie of the Year.
Mostly a left fielder or center fielder so far in the majors, Harper is going to move to right field next season, with Jayson Werth switching from that spot to left.
"I like Harper's arm. It's really strong," Nationals manager Matt Williams said Saturday when asked why the players are swapping positions. "The demands of going to right-center and making that throw are difficult."
The Associated Press contributed to this report.
Nats Sign OF Harper To Two-Year Deal
Jerry Crasnick discusses the two-year deal agreed to between outfielder Bryce Harper and the Washington Nationals, and whether the negotiation will affect his desire to stay with the organization beyond the term of this contract.