Oscar Ramiro Ortega-Hernandez, 21, is accused of firing two shots at the White House and has been charged with attempting to kill Mr Obama or his staff.
He was arrested on Wednesday at a hotel in Pennsylvania.
He will be taken back to Washington to face the charge which carries up to life in prison.
The shots were fired at the White House while the President was away last Friday. However, it is believed that the Obama children may have been within the building.
Authorities said a man clad in black pulled his car within view of the residence and fired two bullets from an assault rifle fitted with a large scope.
They cracked the window of the first family's living quarters.
Later, US Park Police found an abandoned Honda Accord, with the rifle inside it, near a bridge leading out of Washington D.C.
Also recovered was an aluminum baseball bat, brass knuckles and a shopping receipt. Authorities have obtained surveillance footage from a Wal-Mart store.
Ortega-Hernandez has not been linked to any radical organisations but does have an arrest record in three states.
According to court filings, one of the suspect's friends said Ortega-Hernandez saw President Obama as the "devil" and was "preparing something".
The witness said the suspect had said Obama "needed to be taken care of" and had pledged he would "not stop until it's done". Source