Espinosa was later allowed to go home but on Oct. 5 was arrested on charges of illegal possession of drugs. He is the second local government executive on Duterte`s so-called "narco-list" killed during police operations.
The shootout took place after Espinosa and inmate Raul Yap fired at a team from the Criminal Investigation and Detection Group who was on a mission to serve a search warrant against the detainees for firearms and illegal drugs, police said.
"As a matter of procedure, this incident will undergo investigation to establish the facts and circumstances surrounding the incident," Eastern Visayas Regional Police Chief Superintendent Elmer Beltejar said.
Police said they recovered a .45 caliber pistol and a .38 Super pistol from the cells of Yap and Espinosa. A small sachet containing suspected methamphetamine and assorted drug paraphernalia were also found inside Espinosa`s cell, police said.
The presidential palace described Espinosa`s death as "unfortunate" and said an investigation was ongoing.
Espinosa had publicly denied any part in the drug trade but said his son was peddling "shabu" (methamphetamine), which he gets from a jailed Chinese drug trader.
Kerwin, allegedly among the biggest illegal drug operators in the Eastern Visayas region, was arrested by Abu Dhabi police last month, according to Philippine National Police chief Director General Ronald dela Rosa.
In October, Samsudin Dimaukom, a powerful mayor in the troubled Duterte home province of Mindanao, was also killed along with nine of his guards in a shootout, according to police.
More than 2,300 people have been killed in police operations or by suspected vigilantes in connection with the anti-narcotics campaign since Duterte took office on June 30.
Duterte said on Friday his war on drugs had cut back the supply to "very low" levels and thanked China for supporting his crackdown, but swore repeatedly at ally the United States for criticizing it.