The attack took place last night and four persons were arrested today, police said.
Mohan Lal, who is posted with the Crime Branch of Delhi Police, was returning home in Sector 18 of Rohini from office when some persons suddenly started hitting him with sticks.
"Seeing this, a security guard tried to intervene but he was also attacked. After beating the duo, the accused fled from the spot," said a senior police officer.
The whole incident was captured on the CCTV cameras installed outside the apartment, he said.
"A case under appropriate sections has been registered at Samai Pur Badli police station. Further probe is on," he said.