Nitin, lodged in the district jail Meerut was brought to the court for hearing where he was shot at, police said.
He was rushed to hospital where he succumbed to injuries.
A resident of Badaut in Baghpat district, Nitin had 18 cases of murder and attempt to murder against him in Meerut, police added.