The Shebab militants also banned trading in tobacco and alcohol in the Afgoye district, which is home to several hundred thousand displaced people, even outlawing smoking in private homes.
"I’m conveying to you an order that people in the district cannot smoke cigarettes and use tobacco," local Shebab official Sheikh Abu Ramla told a public gathering in Afgoye.
"Anyone found disobeying these orders will be jailed for one month and also face a fine of three million Somali shillings ($100)," he said.
Residents confirmed to AFP that the ban was already in place.
"We are also warning the business community in the region against trading in tobacco and cigarettes which is forbidden in Islam," Ramla said.
The Shebab control most of south and central Somalia, mired in conflict since 1991.
They have already imposed a radical form of Islamic Sharia law, carrying out amputations, enforcing a strict dress code and banning non-religious music and several forms of entertainment.
Afgoye is northwest of the capital and home to hundreds of thousands of Somalis who had fled the fighting between the Islamists and pro-government forces.