Amine El Khalifi, 29, of Alexandria, Virginia was taken into custody by the FBI.
Officials told US media the man thought he was heading to carry out a suicide attack on the Washington DC building, home to the US Congress.
El Khalifi was “closely and carefully monitored” for weeks, according to the FBI and US Capitol police.
Authorities say the public was never in any danger.
El Khalifi allegedly thought undercover FBI agents he was working with were members of the al-Qaeda network.
However, he was not believed to have any known existing connections to al-Qaeda, officials said.
El Khalifi was said to have overstayed a visitor visa for years, and was under investigation for more than a year, according to the Associated Press news agency.
He carried a vest he thought was packed with explosives, reports said, but had in fact been supplied and made harmless by undercover agents.
“Explosives the suspect allegedly sought to use in connection with the plot had been rendered inoperable by law enforcement and posed no threat to the public,” a spokesman for the US Justice Department said.
El Khalifi was not arrested on the Capitol grounds and had been under surveillance for several weeks, AP reported.
US law enforcement officials routinely carry out sting operations in an effort to stop potential terror suspects.
In one of the most recent incidents, in September 2011, 26-year-old US citizen Rezwan Ferdaus was arrested for allegedly plotting to fly explosive-packed, remote controlled planes into the Pentagon and the Capitol building.
DOOi0dpcWCcImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…