The attack occurred late Sunday near the town of Zinapecuaro, Michoacan.
The dead include 16 men and three women, and a number of people were wounded in the attack.
The office said that drug cartels and gangs had been fighting in the area.
Michoacan has been the scene of a longstanding turf battle between local cartels and the Jalisco cartel, from the neighboring state of Jalisco. The fighting has included the use of bomb-dropping drones, landmines, and homemade armored cars.
Cockfighting, while illegal in many areas, remains a popular pastime in parts of Mexico, though the fights between roosters are usually held clandestinely.