A civilian pedestrian was also injured in the attack in the crowded Batamaloo bus stand in central Srinagar around noon, a police spokesman said.
The grenade was lobbed by unidentified militants on a police vehicle carrying the undertrial, Shakeel Ahmad Kasana, to Baramulla district jail from Panthachowk police station, he said.
The grenade landed and exploded inside the vehicle, injuring four policemen and the undertrial, who later succumbed at a hospital, he said.
Kasana, a resident of Akhal village of Kangan in Ganderbal district, was arrested last year under Section 7/25 of the Arms Act and slapped with the Public Safety Act.
Police assisted by security forces cordoned off the area immediately after the grenade attack but no one was arrested in the subsequent search operation, the spokesman said.
The attack comes barely four days after suspected militants brutally killed a policeman by slitting open his throat in Vilgam village of Kupwara district.