Zachary Adam Chesser, 20, was detained on 10 July as he tried to board a flight to Uganda.
He allegedly told federal agents he had twice tried to go to Somalia to join al-Shabab, which the State Department designated a terrorist group in 2008.
Al-Shabab has taken control of large parts of Somalia and claims to have links with al-Qaeda.
"This case exposes the disturbing reality that extreme radicalisation can happen anywhere, including Northern Virginia," said US Attorney Neil MacBride.
"This young man is accused of seeking to join the Shabab, a brutal terrorist organisation with ties to al-Qaeda. These allegations underscore the need for continued vigilance against homegrown terror threats."
Mr Chesser was also named in court papers as Abu Talhah al-Amrikee.
He allegedly told investigating agents that he maintained several online profiles dedicated to extremist jihad propaganda.
US investigators alleged that Mr Chesser was a follower of radical US-born cleric Anwar al-Awlaki, a radical American Muslim cleric of Yemeni descent who is believed to be in Yemen with al-Qaeda in the Arabian Peninsula.
Mr al-Awlaki is suspected of helping plan the attempted bombing of an airliner over Detroit last Christmas.