This is the first visit of a US top official to Somalia since the 1993, when US troops were expelled from Somali territory. One of the objectives of the visit is to strengthen cooperation to face extremist militant group Al Shabab.
The meeting took place in a heavily guarded area inside the city's international airport, surrounded by seven-foot walls of sandbags.
Among the issues discussed is the situation of almost 450 thousand Somali refugees in Kenya, mainly located in the Dadaab camp, which the Kenyan government has been threatening to close over the next three months.
"In recognition of the progress made and the promise to come, the United States will begin the process of establishing the premises for a diplomatic mission in (the Somali capital) Mogadishu," Kerry said in a statement.
"While we do not yet have a fixed timeline for reopening the embassy, we are immediately beginning the process of upgrading our diplomatic representation," Kerry said.
Secretary Kerry discussed with Mohamud about the preparations to hold a referendum on a new constitution and an election for its president in 2016.