Police in Guanajuato state said the attack on Wednesday occurred at a modest two-story house, which was an unregistered rehab centre on the outskirts of the town of Irapuato.
It is understood that the attackers shot every man at the rehab centre but let the women in the building go free.
Rosa Alba Santoyo, who lost three sons in the attack, said a woman at the centre said the gunmen told the women to get out, before gunning down the men.
Ms Santoyo said two of her sons, construction workers aged 29 and 39, were at the centre because they had problems with drugs, while her youngest son, 27, had been at the centre previously and recovered.
He had only returned on Wednesday to bring his brothers soft drinks when the gunmen killed all three of them, she added.
The shooting, which is the deadliest such attack in a decade, has led to calls for change in a prosperous state which has become a battleground for cartels.
Guanajuato, a major car-making hub, has become one of the principal flashpoints for criminal violence in Mexico, due to a turf war between the local Santa Rosa de Lima gang and the powerful Jalisco New Generation Cartel.
About 1,400 homicides were registered in the state this year up to the end of May, more than any other state, according to federal data.
Mary Moreno, a woman who lives near the centre, said the gunmen simply burst into the rehab and started shooting.
“The government doesn't do anything anymore,” she added.
Rehab centres are known to have been targeted by criminal gangs seeking control of the drug business and gunmen opened fire at a different addiction rehab centre in Irapuato on 6 June, killing 10 men.
No motive was given for this week's attack but Diego Sinhue Rodriguez Vallejo, Guanajuato’s governor, said drug gangs appeared to have been involved.
“The violence generated by organised crime not only takes the lives of the young, but it takes the peace from families in Guanajuato,” Mr Rodriguez Vallejo, who belongs to the conservative opposition party National Action, said.
Andres Manuel Lopez Obrador, Mexico’s president, said on Thursday that “changes must be made to solve Guanajuato's problem, because the circumstances demand it.”
“The problem was allowed to grow, it grew a lot and we have to see if there was some sort of cooperation, criminal conspiracy between the criminals and officials,” he added, without specifying who he was accusing.
There have been persistent reports that state authorities who once tolerated the Santa Rosa de Lima gang turned in recent years to allow the Jalisco cartel to enter the state in the hope they would end the local gang's systematic extortion of businesses.
However, the less sophisticated Santa Rosa gang has been more resilient to Jalisco than expected.
Additional reporting by agencies