Scheduled to depart on August 18th, Erdoğan will arrive to Somalia on August 19th accompanied by his family and the Somali President Sheikh Sharif Ahmed.
Visits by world leaders to Somalia are extremely rare due to the extreme security risks, but Erdoğan was undeterred.
"It is impossible for us to be spectators to the human tragedy in Africa," Erdoğan said.
"My foreign minister and I will visit Somalia with our families. So, we will get a chance to see the situation there," Erdoğan told a meeting of the ruling Justice and Development Party (AKP) in Ankara.
It is especially dangerous to visit the Somali capital Mogadishu after Islamist rebels mostly pulled out last weekend, raising the spectre of more guerrilla-style attacks such as suicide bombings after their failure to win a military combat.
The government and African peacekeepers admit they do not control all of the capital even after the rebels' withdrawal.
The last leader to visit was Ugandan President Yoweri Museveni in November last year.
His army contributes more than half of a 9,000-strong African Union peacekeeping force propping up the government. But no one from outside Africa has been for a very long time.
Istanbul will host a meeting on Aug. 17 of the 57-nation Organisation of the Islamic Conference aimed at galvanising support for Somalia and drought-struck neighbouring regions.
The meeting, which comes during the Muslim fasting month of Ramadan, was proposed by Foreign Minister Ahmet Davutoğlu.
Turkey sent two cargo planes laden with 50 tons of food and medical supplies to Somalia on Monday and the Turkish Red Crescent is working with the government's development agency and Office of Religious Affairs to raise donations from the public.
Turkey, with its multi-party democracy and rapidly growing economy, is widely regarded as a model for development in other countries of the Muslim world.
Erdoğan's wife, Emine, visited flood-stricken areas of Pakistan last year, raising Turkish awareness of its people's plight. Turkey's speedy response to disasters has strengthened reputation within the Islamic and developing world.
Sharing details with Sabah on the exclusive dinner shared between Prime Minister...
Prime Minister Recep Tayyip Erdoğan has gone to Reyhanlı to examine the fallout of...
Prime Minister Erdoğan accused CHP leader Kılıçdaroğlu of harming the nation and...
Arriving upon invite by Prime Minister Erdoğan, EU Council President Rompuy told...
Turkish lawmakers have passed a bill in parliament to impose a number of tightened...
Prime Minister Erdoğan said on Thursday that he no longer considers main opposition...
Foreign Minister Davutoğlu says that a new transitional period needs to begin in...
A study entitled “The Kurdish Issue and the Perception of the Resolution Process”...
Turkey has closed down its side of the last border crossing with Syria still controlled...
EU Socialist group leader Swoboda has denounced all allegations he was collaborating...
Minister Davutoğlu said, “The perpetrators of the Reyhanlı attacks are not unknown,...
If no results are reaped from the parliamentary efforts to collaborate on the drafting...
During a one-on-one meeting with President Obama in Washington, Prime Minister Erdoğan...