The bomb destroyed 10 cars and damaged several buildings nearby in a well-guarded area near the Presidential Palace, a Reuters reporter said.
Al Shabaab forces claimed responsibility for the attack on an affiliated radio station, saying the bombing targeted a place where security and government workers meet at night.
The Islamist group, which once ruled much of Somalia, has been fighting for years to impose its strict interpretation of Islam on Somalia.
The insurgents have frequently launched raids and deadly attacks in Mogadishu and other regions controlled by the federal government in the last two years, despite losing large swathes of territory to government forces and their allies.