Internal Security Forces detained a man in a suburb of Beirut, according to a statement posted to Facebook. The weapon thought to have been used in the attack was also seized.
The Lebanese man, born in 1997, was only referred to by the initials MK. He admitted to the shooting, police said.
Shots were fired near the US embassy in the northern suburb of Awkar on Wednesday, the anniversary of a 1984 bombing that killed 24 people at the diplomatic mission.
No one was injured in the shooting.
An investigation is now under way, the ISF added.
“We are grateful for the speedy and thorough investigation by the local authorities," said embassy spokesman Jake Nelson.
No one claimed responsibility for the shooting and the motives behind it were not known.
American forces and diplomats have come under attack several times in Lebanon, prompting the US to close its embassy and withdraw all diplomatic staff between 1989 and 1991.
The deadliest attack occurred in October 1983, when a suicide lorry bomber killed 241 American service members at Beirut airport's US Marine barracks.
In April 1983, 63 people were killed in a bombing at the embassy, including top CIA officials.
Washington blamed Hezbollah for the attack, which pushed the US to move its embassy to the Beirut suburbs.
In 2008, an explosion targeted a US embassy vehicle in northern Beirut, killing at least three Lebanese who happened to be near the car and wounding its Lebanese driver.
An American passer-by was also wounded.