The attack appeared to be part of an intensified campaign over the past two weeks by the al Qaeda ally in Somalia and neighboring Kenya, which have porous borders and often ad hoc methods for sharing intelligence.
Three people were killed in Wednesday's blast, Saleh Hassan Omar, spokesman for the city's mayor, said in a statement. The bombing hit Sayidka junction, a security checkpoint near the palace, the interior ministry and parliament.
Aamin ambulance service head Abdikadir Abdirahman told Reuters that 11 people were wounded, including three women.
Al Shabaab issued a statement claiming responsibility for the bombing and saying the attack showed that the government has not fully secured "Mogadishu's major arteries."
On Sunday, three Americans -- one U.S. military service member and two contractors -- were killed by Al Shabaab during an attack on a military base in Kenya near the Somali border. The base is used by both U.S. and Kenyan forces.
On Dec. 28, a truck bombing claimed by al Shabaab at a busy checkpoint in Mogadishu killed at least 90 people, in the deadliest such attack in the country in more than two years.
The group regularly carries out attacks aimed at undermining Somalia's government, which it has been fighting to overthrow for more than a decade.
Last year, 21 people died during an al Shabaab assault on a hotel complex in Nairobi, the capital of Kenya, which in 2011 sent troops into Somalia after a spate of cross-border attacks and kidnappings.
Security analysts say that a spate of recent attacks in Mogadishu have hit unusually sensitive locations, showing the group's continued ability to mount sophisticated attacks.
In September, it also targeted a base where U.S. special forces train Somali commandos, though no one was killed.
The group has also launched three deadly attacks in Kenya in the last week, in different areas near the border with Somalia. The latest was on Tuesday, when four Kenyan school children were killed in a gunfight between militants and police.