The executions, by hanging, were carried out on Wednesday in a Cairo prison.
In November, Egypt's top appeals court had confirmed the death sentence for the nine people convicted in then-chief prosecutor Barakat's murder in June 2015.
An interior ministry official, who spoke on condition of anonymity because he was not authorised to brief media, told the AP news agency that the families of the men were told to pick up their bodies from a Cairo morgue. A total of 15 people have been executed in Egypt since the start of the year.
Rights group Amnesty International had appealed to the authorities on Tuesday to halt the executions, citing testimony by the defendants that they had been secretly arrested and tortured into confessing.
"There is no doubt that those involved in deadly attacks must be prosecuted and held accountable for their actions, but executing prisoners or convicting people based on confessions extracted through torture is not justice," said Amnesty's Najia Bounaim.
"At least six men have already been executed earlier this month after unfair trials. Instead of stepping up executions, the Egyptian authorities should take steps to abolish the death penalty once and for all."
Last week, Egypt hanged three people convicted of the 2013 murder of senior police officer Nabil Farag.
The previous week, it hanged three young "political detainees" convicted of the September 2013 murder of the son of a judge, Human Rights Watch reported.
No one claimed responsibility for the 2015 attack against Barakat, but the authorities pointed the finger at members of the outlawed Muslim Brotherhood of overthrown President Mohamed Morsi.
Since Morsi's overthrow by then army chief and now President Abdel Fattah al-Sisi in 2013, Egypt has cracked down on Islamists who backed the former.
Hundreds of Morsi supporters have been sentenced to death, while the former president and top Muslim Brotherhood figures have also faced trial.
The Muslim Brotherhood was outlawed and branded a "terrorist organisation" in December 2013, just months after Morsi's removal.
Many of the death sentences have been handed down at mass trials involving hundreds of defendants and lasting just days.