The bomb destroyed several cars and blew out storefront windows in the upscale district of Heliopolis. At least five vehicles were completely gutted in the explosion. There were specks of blood on the street.
Witnesses said one of the charred vehicles had belonged to prosecutor, Hisham Barakat, who has been taken to hospital.
Barakat was "not lightly wounded," assistant state prosecutor Zakaria Abdel Aziz told AFP, adding he was undergoing treatment. He would not elaborate.
Read: Egypt court jails ousted president Morsi for 20 years
A police official had said the top prosecutor had been wounded by flying glass.
Bomb squad Chief General Mohamed Gamal told AFP it was either a car bomb or a bomb concealed underneath a vehicle.
The bombing came after the Islamic State group's affiliate in Egypt called for attacks on the judiciary following the hanging of six alleged militants.
Gunmen in the Sinai peninsula, where the extremists are based, had shot dead two judges and a prosecutor in May.
Barakat has referred thousands to trial since the military's overthrow of president Mohamed Morsi in 2013, with hundreds then sentenced to death.
Monday's attack was the most brazen against a senior official in Cairo since extremists tried to assassinate the then interior minister in a suicide car bombing in late 2013.
Ansar Beit al-Maqdis, the Sinai-based organisation that later pledged allegiance to the Islamic State group, claimed responsibility for that attack.
In May, the group called for attacks on judges in an audio message posted online.
The recording came after authorities hanged six men convicted of participating in militant attacks.
"By God, we will seek vengeance for our brothers and others like them, from the party that sentenced them, and the party that implemented the sentence," the extremist group said in the recording.
The militants have killed scores of policemen and soldiers in attacks since Morsi's overthrow, mostly in the Sinai peninsula.
Read: Egypt mass jailbreak: Mursi, 100 others sentenced to death
The group carried out several high profile attacks in Cairo and the Nile valley in 2013 and 2014 before police killed or arrested its members in those areas.
The government of President Abdel Fattah al-Sisi, who as army chief toppled Morsi, has blamed his Muslim Brotherhood movement for the violence.
Sisi has pledged to eradicate the group, once the largest political movement in Egypt.
At least 1,400 people, mostly the Brotherhood supporters, have been killed in a police crackdown on protests, and much of the party’s leadership has been arrested.
Courts have sentenced hundreds to death, including Morsi himself, who was convicted of involvement in attacks on police stations.
Morsi's sentence is being appealed.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ