“Those celebrations are not in any way related to Islam,” an official at the religious affairs ministry said.
Security agencies have been directed to stay alert to stop any gatherings.
Foreigners are free to mark the Christian holiday in their own homes, but hotels and other public places have been prohibited from marking the day.
“Having Muslims celebrate Christmas in Somalia is not the right thing, such things are akin to the abandonment,” local media quote Mohamed Kheyrow, a top official at Somalia’s justice and religious affairs ministry, as saying.
Correspondents say as the country recovers from years of civil war, a growing number of Somalis who grew up in the diaspora are returning home, some of them bringing Western customs with them.
Christmas is not widely celebrated in Somalia, which officially adopted Sharia in 2009, but the odd event was held – especially as an excuse to hold a party.
Mogadishu’s mayor, Yusuf Hussein Jimale, told the BBC that such gatherings might also be a target for the Islamist al-Shabab group that has targeted hotels in the city in the past.
Celebrations will be allowed at UN compounds and bases for African Union peacekeepers, who are in the country to back the government’s fight against the al-Qaeda-linked militants.