A second explosion followed nearby. Al Shabaab, in comments broadcast on its Radio Andalus, claimed responsibility for both blasts and said the second was also a car bomb.
"The death toll has risen to 13 people including civilians and soldiers. Seventeen others were injured. The casualties are from the two blasts," Major Mohamed Hussein, a police officer, told Reuters.
Among those killed were a journalist, two security personnel and a driver working for local station Universal TV, whose car was passing the checkpoint at which the first blast went off, another reporter working for the station said.
"My colleague Awil Dahir Salad died in the blast together with the driver and two security guards. They were killed by the first blast as they drove. May Allah rest their souls," journalist Abdiasis Ibrahim who works for Universal TV, told Reuters.
Police had earlier said the first car bomb at the checkpoint killed five, mostly soldiers.
A Reuters witness at the scene of the second blast said he saw at least two bodies.
Ahmed Abdi, another police officer, said the first car bomb exploded at a checkpoint some 400m from the president's residence.
Al Shabaab carries out frequent attacks in Mogadishu. Its members want to dislodge the government and impose its rule based on its own strict interpretation of Islam's sharia law.
The group was forced from Mogadishu in 2011 but maintains a foothold in some regions. It has killed thousands of Somalis and hundreds of civilians across East Africa in a decade-long insurgency.