The blast occurred at a checkpoint near the presidential palace just as the Horn of Africa country's new prime minister unveiled his government lineup.
"The vehicle was stopped at the checkpoint for security screening when it went off. At least five people were killed including security personnel and 10 others wounded," said Abdifatah Omar Halane, spokesman for the Mogadishu administration.
"The blast was so huge, I saw smoke and dust all over the area," witness Abdukadir Yusuf said.
Somalia's new Prime Minister Hassan Ali Kheyre earlier today unveiled his new cabinet, made up of 26 ministers including six women, after almost a month of political bargaining.
The Al-Qaeda-linked Shabaab militant group, which is fighting to overthrow the government, has been blamed for a string of attacks in Mogadishu.
The Shabaab was forced out of the capital by African Union troops in 2011 but still controls parts of the countryside and carries out attacks against government, military and civilian targets in Mogadishu and regional towns.