The Iraqi air force say the Russian-made Sukhoi jet was returning from a bombing raid against Islamic State (IS) militants.
The pilot made six attempts to dislodge the bomb after it became stuck during the attack, according to the military.
It then fell as the plane overflew the capital, destroying several houses.
"One of the bombs became stuck because of a technical problem, and during its [the aircraft's] return to base it fell on... houses in Baghdad Jadida," security spokesman Brigadier General Saad Maan told the Associated Press news agency.
The agency also reports that at least three children are among the dead.
Iraqi forces, backed by a US-led airstrikes, have been fighting IS militants who control much of the west and north of the country.
At least eight people have been killed after a "technical problem" caused a bomb to fall from an Iraqi military plane over Baghdad.