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.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…