The incident took place on the premises of Old MLA Quarters in Hyderguda here.
Ravinder, the security officer, was being questioned with regard to the incident, the police said.
"The incident occurred in the restroom of the security officer when Sayed Akbar, the driver, took Ravinder's service revolver to see it. The trigger went off accidentally when Ravinder was taking it back and the bullet pierced Akbar's chest. He died on the spot. We are conducting further probe," Deputy Commissioner of Police V B Kamalasan Reddy said.