The pre-dawn brawl erupted in the maximum-security wing at the CERESO federal prison in Acapulco, a resort town on Mexico's Pacific coast that has been hit by grisly violence between warring drug cartels in recent years.
The victims were stabbed and beaten to death, said Roberto Alvarez, security spokesman for the state of Guerrero.
"Order has now been restored," he said in a statement.
Guards said four of the victims had their throats slit, according to an internal state police report. It also said gunshots had been fired in the maximum-security wing, apparently by prisoners.
In June, seven people were killed, including three police, when officers stormed the Ciudad Victoria prison in the northern state of Tamaulipas to regain control from prisoners who had been stockpiling guns inside.