Police said the Bharatiya Janata Party MP's personal secretary Parminder and his supporters barged into the district magistrate's office in Kanjhawala area in northwest Delhi, and attacked him.
The reason behind the attack was not immediately clear, and no one was arrested till Thursday evening, police said.
"An FIR has been filed against the people involved in thrashing the district magistrate. We have started our investigations," a police official told IANS.
Deputy Chief Minister Manish Sisodia tweeted: "Strongly condemn the assault on Sanjay Goyal, (District Magistrate Northwest Delhi) by henchmen of a BJP MP in Delhi."
"This is a deliberate attempt to scare officers from performing their duties.
"Such attempts would not be tolerated and police should take stern action. All assaulters should be arrested," Sisodia demanded.
According to Delhi government officials, Sisodia also spoke to Lt. Governor Najeeb Jung and requested him to instruct Delhi Police to provide adequate security to district magistrates and sub-divisional magistrates.
Condemning the attack, Delhi government spokesperson Nagendra Sharma also tweeted: "Will LG of Delhi have the guts to convene a meeting of the IAS association now after a DM has been beaten up by BJP MP's supporters?"
The AAP in a statement condemned the attack, saying the BJP was bringing a dangerous political culture to the national capital by unleashing its hoodlums on senior administrative officers, who refuse to obey their illegal diktats.
"It is extremely shocking that the private secretary of a BJP MP led a mob into the office of a DM and assaulted him in full public view," the statement said.
"The AAP wants to know from Delhi Police how much time will it take to arrest the culprits involved in assaulting a senior IAS officer, the CCTV footage of which is also in public domain," it said.
The AAP accused the BJP of misusing Delhi Police to terrorise honest officers and said it was not the first instance in which BJP workers were involved in attacking officers on duty.
The BJP-led central government should also make its stand clear about what kind of conduct its MPs were preaching, the AAP demanded.