According to the Washington Post, Riggleman told general manager Mike Rizzo he would resign if the team did not pick up the option on his contract for next season.
"Jim told me pregame today that if we wouldn't pick up his [contract] option that he wouldn't get on the team bus today," Rizzo said at a news conference after the game.
Riggleman has yet to comment on his resignation.
"Jim is a good baseball man," his agent, Burton Rocks, said. "He will manage again. And he will win. The Nationals should have picked up his option sooner rather than later. It rewards a job well done and promotes team chemistry."
Riggleman's surprise announcement comes as the Nationals have surged to 38-37 after winning 11 of their last 12 games.
The veteran manager took the reins in the nation's capital in 2009, going 140-172 in that span. The 58-year-old Riggleman managed the Mariners in 2008, going 36-54 after taking over for John McLaren.