A suicide vehicle bomb was rammed into a popular hotel, Nasahablod Two, about 600 metres from the presidential palace, and then armed militants stormed the building, police said.
Police have said more than 20 people, including government officials, are thought to be trapped inside.
Following the blasts, witnesses reported hearing gunfire and said the entire area around the Nasa Hablod Hotel 2 had been sealed off by security forces to keep people away.
Three of the five attackers were killed, Capt Hussein said.
Police Colonel Mohamed Abdullahi says the bomber stopped outside the heavily fortified hotel and pretended to fix the vehicle before finally turning it around and detonating.
The Shabab, an Al Qaeda-affiliated militant group, claimed responsibility for the attack on a media channel associated with the group.
Civilians assist a man, injured from a suicide vehicle bomb explosion, at the gate of Nasahablod Two Hotel in Hamarweyne district of Mogadishu, Somalia. It is frequented by politicians and other members of Mogadishu's elite.
A huge cloud of smoke rose over the hotel and there were more than a dozen wrecked cars outside.
One senior police official and a former MP are among the dead.
Play original Xbox Classic games on your Xbox One
Unfortunately, it only contains a 1TB hard drive, which is half of the maximum storage that was available in the Xbox One S. Both Xbox One and Xbox 360 owners are in for a free download of " Nights into Dreams " starting November 1 to November 15.
The al-Shabab extremist group has quickly claimed responsibility for the suicide vehicle bomb that detonated outside the Nasa-Hablod hotel, which is frequented by politicians and other members of Mogadishu's elite.
The Somali government blamed the October 14 blast on al-Shabab, but no group has claimed responsibility.
Police say at least 10 people are dead and more than 11 are wounded in an attack on a popular hotel in Somalia's capital.
The Somali militant group Al Shabab said it carried out the bombings.
According to an Al Jazeera tally, since the start of this year, more than 20 explosions have targeted Mogadishu, killing at least 500 people and injuring more than 630.
The second vehicle-borne bomb blast occurred at the ex-parliament house where there were military forces present, another police officer said.
At least 10 people have been killed in a double auto bombing in the Somali capital, Mogadishu, which is still reeling from a massive attack that left hundreds dead earlier this month.
"The Mujahedeen fighters are inside Nasa Hablod 2 hotel where... apostate officials are staying", it said.