The bench had on Tuesday initiated contempt proceeding against RM Shrivastav. The court had summoned Shrivastav again Wednesday with the compliance report.
However, the state government moved the division bench consisting of justice Umanath Singh and justice Mahendra Dayal for relief.
The court after listening to the both parties stayed the proceedings against Shrivastav.
Shrivastav was taken into custody around 10.30am on Tuesday for not complying with its order to provide security to a former minister.
A bench of justice Chandra ordered the custody of the top official till 2pm after he failed to give a satisfactory reply on why the state government had failed to give security to Upadhaya.
On the court's orders, Central Reserve Police Force personnel cordoned off court number 7, where Shrivastav was held in custody.
According to the latest information, his custody continued even beyond 2pm as the ruling Samajwadi Party government scrambled to come up with a proper response for the court.
Upadhaya had approached the court seeking adequate security from the government. The court had directed the government to provide the security in accordance with norms. The order, however, was not implemented.
Upadhaya had then moved a contempt petition, following which the court fixed Tuesday for the hearing.
Shrivastav earned the court's ire after failing to give a proper explanation for why the order had not been implemented.