Somalia is not just a story of violence and state failure. Focus on our strengths
The decision came after Somalia established its first government and parliament in 21 years, Foreign Ministry spokesman Hong Lei said. He said Beijing would send a delegation to Somalia on Tuesday.
"Somalia has entered a new stage of its peace process," Hong told reporters at a regular briefing. "That brings a new opportunity for the development of China-Somalia relations."
Chinese diplomats left Somalia in January 1991 after a longtime dictator was overthrown and warlords turned on each other, plunging the impoverished country into chaos.
The United States announced earlier in June that it would appoint an ambassador to Somalia but said it had no immediate plans to re-open its embassy in the capital, Mogadishu, which has been beset by violence and deadly bombings spurred by the militant network al-Shabab.
Few non-African countries maintain embassies in Somalia. Britain last year opened its mission there for the first time since 1991, becoming the first country within the European Union to do so.
China has a large presence on the African continent, with Chinese companies building roads, airports and other infrastructure. Beijing has opened more embassies and commercial offices in recent years. Last year, China-Africa trade reached $210 billion, according to official figures.
In Somalia, where the needs are extreme, multiple, and urgent, there is no shortage of development projects, but more often than not, this dominates the global view of Somalia. However, this is not the full story.