The FBI said Adel Daoud had planned to detonate a car bomb outside a bar in the city.
He had been tracked by the FBI after posting comments online about violent jihad and the killing of Americans, the Associated Press reports.
He was arrested on Friday in a sting operation, where agents posing as extremists gave him a phoney bomb.
Officials said the bomb was inert and that the public was never in danger.
Mr Daoud has been charged with attempting to use a weapon of mass destruction and attempting to damage and destroy a building with an explosive, AP reports.
The charge carries a maximum sentence of life in jail.
US law enforcement officials have increasingly carried out "sting" operations in an effort to stop potential terror suspects.
There has been a number of convictions based on stings in recent years, but Muslim groups and civil rights groups have expressed concern at the use of such tactics.
- Relief as surgeons re-attach man’s severed private organ
- Can medical board really bite finger that feeds it?
- Mother claims nurse watched her newborn die
- Governor’s encounter with leaky roofs in school
- Police arrest former councillor for piracy
- Cord leaders allege ploy by State to ‘kill’ devolution through Ministry