"She is withdrawing for personal reasons," an administration official told AFP.
Dhanani had appeared before the Senate in March to seek confirmation in the post.
"Decades of conflict, famine, and oppression led many to label Somalia a 'failed state.' Today, Somalis are proving those pessimists wrong," she told a panel.
The US withdrew its ambassador as rival warlords took over the African nation.
In 1993 Americans were anguished by scenes of the bodies of US soldiers being dragged through the streets of Mogadishu by a mob after Somali militants shot down two Black Hawk helicopters.
Violence is still a major problem, but earlier this month John Kerry made a surprise visit to the country.