Somalia-based Islamist militant group Al-Shabaab claimed responsibility for the attack. Group spokesman Sheikh Abdiaziz Musab, speaking to pro-Al-Shabaab outlet Andalus radio, said the blast targeted and killed several Somali intelligence agents.
Somali police spokesman Qasim Mohamed Roble told reporters that the car bomb killed no government official or soldier. Among the dead, he said, was a boy who shined shoes.
The area is not a new target for Al-Shabaab, which has battled Somalia's government for years with the goal of establishing a fundamentalist Islamic state.
The restaurant is across the street from the Central Hotel, where Al-Shabaab killed at least 15 people in a bombing and gun attack in February
The streets outside the restaurant were "littered with debris and human body parts" after Tuesday's explosion, witness Mohamed Ali said. The blast damaged nearby buildings and vehicles at a parking lot, according to Ali.
Ambulances took wounded people to a nearby hospital for treatment.
Tuesday's bombing is at least the third high-profile attack near or at a Mogadishu hotel since February.
On February 20, militants attacked the Central Hotel, blowing up a car bomb outside before shooting people and detonating another bomb inside. Al-Shabaab claimed responsibility for the attack.
More than a month later, on March 27, gunmen detonated explosives and shot people at a different Mogadishu hotel -- the Makka Al Mukarama
-- leaving at least 20 people dead. The attack stretched into the next day before security personnel killed all the assailants.
Al-Shabaab also said it was responsible for the Makka Al Mukarama attack, claiming it targeted the hotel because its guests were spies and government officials.
Among those killed in the March 27 assault was Yusuf Mohamed Ismail Bari-Bari, Somalia's permanent representative to the United Nations in Geneva, Switzerland, the Somali government said.