The West Virginia governor initially on Wednesday said the troops had died, but later walked back the statement to say his office was "receiving conflicting reports" about their condition. The governor's office did not immediately respond to questions about the attack and the condition of the troops.
A suspect who was in custody also was shot and had wounds that were not believed to be life-threatening, according to a law enforcement official who was not authorised to discuss the matter publicly and spoke to The Associated Press on condition of anonymity.
"We are in ongoing contact with federal officials as the investigation continues," Governor Patrick Morrisey said.
Law enforcement was reviewing surveillance video from the scene and believed the suspect approached the soldiers and pulled out a gun, said another law enforcement official who was not authorised to discuss the matter publicly and spoke to AP on condition of anonymity.
At least one of the soldiers exchanged gunfire with the shooter, the official said. Investigators were trying to determine the gunman's motive, including whether the suspect was targeting the troops for any specific reason, the official said.
The shooting happened about two blocks northwest of the White House.
Emergency medical responders transported all three people to hospital, according to Vito Maggiolo, the public information officer for the DC Fire and Emergency Services.
The presence of the National Guard in the nation's capital has been a flashpoint issue for months, fuelling a court fight and a broader public policy debate about the Trump administration's use of the military to combat what officials cast as an out-of-control crime problem.
More than 300 West Virginia National Guard members were deployed to Washington in August. Last week, about 160 of them volunteered to extend their deployment until the end of the year while the others returned to West Virginia just over a week ago.
Police tape cordoned off the scene where fire and police vehicle lights flashed and helicopter blades thudded overhead. Agents from the Secret Service and the Bureau of Alcohol, Tobacco, Firearms and Explosives were on scene, as National Guard troops stood sentry nearby. At least one helicopter landed on the National Mall.
President Donald Trump, who was in Florida for Thanksgiving, warned in a statement on social media that the "animal" who shot the guardsmen "will pay a very steep price."
"God bless our Great National Guard, and all of our Military and Law Enforcement. These are truly Great People," Trump wrote on Truth Social.
"I, as President of the United States, and everyone associated with the Office of the Presidency, am with you!"
Trump issued an emergency order in August that federalised the local police force and sent in National Guard troops from eight states and the District of Columbia. The order expired a month later, but the troops remained.
The soldiers have patrolled neighbourhoods, train stations and other locations, participated in highway checkpoints and also have been assigned to rubbish pickup and to guard sports events.
Last week, a federal judge ordered an end to the deployment but also put her order on hold for 21 days to allow the Trump administration time to either remove the troops or appeal the decision.Bedayn contributed to this report.