The undertrials made good their escape after removing iron rods of the window in the court custody room where they were kept for presentation before court, Superintendent of Police Upendra Kumar Sharma said.
Four of them were later nabbed with the help of locals but two still remain at large, the SP said, adding search for them was underway.
The two have been identified as Rakesh Gupta and Amit Sharma, he said.
The SP said that in-charge of court custody room has been suspended for dereliction of duty.