Gunmen carrying assault rifles arrived in trucks and opened fire on the partygoers, according to local media.
A total of 14 people were shot dead at La Playa nightclub in Salamanca.
A further seven were injured as the gunmen sprayed bullets into the crowd in the early hours of Saturday morning.
Armed police and soldiers scrambled to the scene.
Paramedics battled to save some of the victims.
The injured survivors were rushed to hospital.
A search for the gunmen has been launched.
Home to around 260,000 people, Salamanca is in the state of Guanajuato, northwest of the capital Mexico City.