U.S. officials said the man appeared to be an American contractor.
U.N. spokeswoman Radhia Achouri did not identify the man, whom she said was staying at the U.N. compound in Baghdad's heavily fortified Green Zone. A spokesman for the U.S. Embassy in Baghdad also could not immediately identify the man.
Achouri said he was handed over by two Shiite lawmakers who represent the hardline followers of anti-American cleric Muqtada al-Sadr. She did not provide any details.
In an interview with The Associated Press, senior Sadrist official Abdul Hadi al-Mutairi said the man was a U.S. soldier named Michael Hill who was captured June 18.
Al-Mutairi said the man was wearing an American military uniform when he was delivered to the U.N.
Several U.S. officials said he is a private contractor, not an active-duty soldier, although he may have previously served in the U.S. military.
Hundreds of thousands of contractors, both American and other nationalities, worked alongside American troops and in other support roles throughout the war.
Al-Mutairi said the man was released without any negotiation "as a good will initiative toward the American society and to (his) family."
He said the man, whom he said is married and has two sons, was treated well during his nine month imprisonment, "even though he contributed in the battles in Sadr City and in Najaf."
Al-Sadr is the spiritual leader of the Mahdi Army, a Shiite militia that targeted U.S. troops throughout the nine-year war in Iraq.