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.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…