Somalia Foreign Affairs Minister Abdisalam Omer said in Mombasa that the move was part of an agreement reached under the African Union Mission in Somali (Amisom) treaty.
Omer said the troops have been able to stabilize the war-torn country since their incursion in 2011, expressing optimism that the remaining two years are enough for Somalia National Army to become strong enough to control the entire Somali.
The foreign minister termed calls by section of Kenyan leaders to withdraw Kenya Defence Forces (KDF) officers from Somali as a premature move.
"Young men and women from Kenya have died trying to liberate Somali government. It is not fair to withdraw prematurely at this stage, but eventually the troops will have to come back to Kenya," Omer told a Kenyan television station.
He said KDF cannot continue to be viewed as an occupying force.
However, the minister warned Kenyans not to fall prey to Al- Shabaab propaganda that pulling out of Somalia will end the ongoing gruesome attacks being witnessed in the various parts of the country including the Garrisa massacre.
The minister added Somalia has no proof to confirm that KDF soldiers are extending their stay in Somalia and dismissed the UN report linking Kenyan soldiers to selling of charcoal, saying it lacked objectivity.
The leaked report claims Kenyan troops helped export charcoal from Kismayu port after militant group Al-Shabaab lost control of it in September 2012.
KDF entered Somalia in October 2011 in pursuit of Al-Shabaab militia, who had launched attacks in Kenya and had kidnapped tourists and government officials.