The US has established its first diplomatic presence in Somalia for nearly 30 years.
The state department said the “historic event” reflects progress the east African nation had made.
Ambassador Donald Yamamoto is heading the embassy in Mogadishu.
The US closed its embassy in Somalia in January 1991 amid fighting between rebels and the government and had to airlift out its ambassador and staff.
Security has improved in Mogadishu recently, although al-Shabab rebels remain a threat.
Al-Shabab was forced out of the capital in August 2011 following an offensive spearheaded by African Union troops.
US President Donald Trump expanded operations against al-Shabab in March 2017 and the US military has conducted more than two dozen air strikes, including drone strikes, in Somalia this year,
Traditionally, US presidents have been wary of intervening in Somalia since 18 special forces soldiers died fighting militias in Mogadishu in 1993, a battle dramatised in the film Black Hawk Down.