The Turkish Foreign Minister and Prime Minister also confirmed the prosecutor had died.
Kiraz had been leading an investigation into the death of 15-year-old Berkin Elvan, who was hit on the head by a police officer in June 2013, during a mass anti-government rally in Istanbul. He died in March 2014, following 269 days in a coma.
Members of the far-left group, the Revolutionary People's Liberation Party Front (DHKP-C), demanded those responsible for Elvan's death be arrested, otherwise they threatened to kill the prosecutor. The group published a picture of the prosecutor with a gun to his head.
Turkish President Tayyip Erdogan said Kiraz had been shot three times in the head and twice in the body.
Turkish television reported two militants from DHKP-C had been killed during the shootout with police that ended a six-hour standoff.
The siege began when two gunmen, disguised as lawyers, entered the courthouse. Witnesses said they heard gunshots as the hostage-takers entered the building.
"We were on the sixth floor. A black-haired man wearing a suit entered the prosecutor's room and fired a gun three times," Mehmet Hasan Kaplan, who works in the building, told Reuters.
Six hours later, explosions and gunfire could be heard coming from the building and smoke billowed from a window, a Reuters witness said.
A few minutes later, two ambulances, sirens wailing, raced away from the scene.
Istanbul Police Chief Selami Altinok said authorities had established lines of communications with the hostage-takers, but had been forced to act when shots were heard from inside the room where Kiraz was being held.
The DHKP-C said on its website it wanted the police officer it blames for Elvan's death to confess on television, the officers involved to be tried in "people's courts," and charges against those who attended protests for Elvan to be dropped.
In a brief video message on a widely followed Twitter account describing itself as that of Elvan's family, the boy's father called on the group not to harm Kiraz.
"We want justice. We don't want anyone to shed even a drop of blood. We don't want other mothers to cry," Sami Elvan said.
The United States, European Union and Turkey list the DHKP-C as a terrorist organization. It was behind a suicide bombing at the US Embassy in 2013. In 2001, two policemen and an Australian tourist died in a DHKP-C attack in central Istanbul.