Seal Team 6, along with other members of a joint special operations force, rescued the man, according to US officials with knowledge of the operation but who were not authorised to publicly discuss the operation.
President Donald Trump tweeted that "courageous soldiers" had pulled off a "daring nighttime rescue operation" and also told reporters that "it was something that had to get done because they were playing with American citizens".
Secretary of State Mike Pompeo said the rescue by "some of our bravest and most skilled warriors" underscores the US commitment "to the safe return of all US citizens taken captive".
Niger has faced a growing number of attacks by extremists linked to the Islamic State (IS) group and to al Qaeda. Two months ago IS-linked militants killed six French aid workers and their Niger guide while they were visiting a wildlife park east of the capital.
A US official, who spoke on condition of anonymity, said there were no solid indications that Walton's kidnapping was terrorism-related and that it was instead "trending toward a kidnapping for ransom".
But the official said the US Government was concerned that the hostage could be passed to another terrorist group, or that the kidnapping could become a prolonged hostage-taking.
Walton is now back in Niger.
A local government official told the Associated Press that the kidnappers had demanded ransom from Walton's father, who lives about 1km from his son's farm. No ransom was paid, according to the US official.
Trump has repeatedly promoted his administration's focus on securing the release of American hostages held by militant groups abroad as well as others being detained. Two Americans held captive this month by Iranian-backed militants in Yemen were released, along with the remains of a third person, in exchange for the return of about 250 Houthi rebels from Oman.