Hisham Barakat died of his wounds in hospital after the bombing in the suburb of Heliopolis.
According to state media, at least eight others were also hurt in the attack.
Hisham Barakat has referred thousands of Islamists to trial since the overthrow of President Mohamed Morsi in 2013.
Hundreds of Islamists have been sentenced to death or life imprisonment, as part of a crackdown on supporters of the banned Muslim Brotherhood.
Jihadist militants have meanwhile stepped up their attacks on Egypt’s security forces.
Hisham Barakat is the most senior figure to have been targeted for assassination since a 2013 attempt on the life of the then-interior minister.
“He [Hisham Barakat] has passed away,” Justice Minister Ahmed al-Zind told AFP news agency.
The Egyptian state news agency Mena said that he had died after undergoing critical surgery. A medical official at the hospital told the Associated Press that Hisham Barakat had received multiple shrapnel wounds to the shoulder, chest and liver.
The attack involved a car bomb or an explosive device placed under a parked car near Hisham Barakat’s convoy, bomb squad chief Gen. Mohamed Gamal told AFP.
The explosion sent black smoke rising over the neighborhood and set fire to nearby trees. Images from the scene showed several damaged vehicles and bloodstains on the streets.
At least three civilians were killed, according to Mena. Witnesses said that the blast had been strong enough to shatter the windows of nearby homes.
At the hospital, an injured bodyguard said that the explosion had hit Hisham Barakat’s convoy on the way to the office.
“There was glass flying everywhere. It was as if there was an earthquake,” he said, according to AFP.
Hisham Barakat had received death threats in the past.
The Egyptian affiliate of the Islamic State militant group (ISIS) recently called for attacks on the judiciary, after the hanging of six militants.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…