In addition, 37 Indian Administrative Service (IAS) officers were also transferred.
Five commissioners, Gorakhpur District Magistrate (DM) Rajiv Rautela, including DM of 17 districts were changed.
In a list released on Friday, K Vijayendra Pandian was brought in place of Rajiv Rautela as new Gorakhpur DM, while Rautela was made the divisional commissioner of Devipatan division.
Deepak Agarwal, Commissioner of Saharanpur Division, was made the new divisional commissioner of Varanasi.
Replacing Deepak Agarwal, Chandra Prakash Tripathi was made the new Saharanpur divisional commissioner.
K Ravindra Naik, commissioner of Azamgarh was replaced by SVS Ranga Rao, who was earlier the Devipatan divisional commissioner of Gonda district in UP.
Azamgarh DM Chandra Bhushan Singh was made the new DM of Aligarh.
Shivakant Dwivedi, Chitrakoot DM replaced Chandra Bhushan Singh and became the new DM of Azamgarh.