Gunfire was heard at the Istanbul courthouse where the prosecutor, Mehmet Selim Kiraz, was working, the Dogan news agency reported said.
Kiraz was investigating the killing of Berkin Elvan, who died in March last year after spending 269 days in a coma due to injuries inflicted by police in the mass protests of early summer 2013.
In a statement published by Turkish media, the hostage-taking was claimed by the radical Marxist Revolutionary People's Liberation Party-Front (DHKP-C), which has been behind a string of attacks over the last years.
They had also plastered their flags and posters on the walls of his office which is on the fifth floor of the courthouse building.
Also Read
Turkish media said that the group had given a deadline of 3:36 pm (1236 GMT) for the prosecutor to identify the police officers who they say were behind the killing of Elvan or he would be shot.
Their demands also included a "live confession" by the officers responsible and that they should be put before a "people's court".
Special forces were waiting outside the court house building where the prosecutor was taken hostage amid expectations an operation could be launched.
Police moved onlookers away from that building, warning the hostage takers could start firing from the windows.