The blast in the Karrada area, where many people go to shop ahead of the holiday marking the end of the holy Muslim fasting month of Ramadan, also wounded at least 20 people, the officials said.
Interior Ministry spokesman Saad Maan said the attack was a car bomb near a restaurant, and that it burned shops in the area.
There was no immediate claim of responsibility for the attack, but the Islamic State jihadist group carries out frequent bombings targeting civilians in Baghdad and elsewhere.