The incident happened near the canteen area, triggering chaos in court premises.
The victim, Vinod alias Balle, was produced by the staff of Third Battalion in Rohini Court, said Rishi Pal, Deputy Commissioner of Police (Rohini).
While he was being taken back, he was shot at by an assailant at 11.20 am. The accused was arrested from the spot and the weapon of offence seized, he said.
It is suspected that the accused posed as a litigant.
Vinod was taken to Baba Saheb Ambedkar Hospital where he was declared brought dead, said the officer.