"The Mexican migration service regrets the death of 39 foreign migrants," the migration service said on Twitter.
The migration service specified later on Tuesday that 28 victims were citizens of Guatemala.
There were 68 men from Central and South America in the center, the statement said, adding that 29 people were injured in the fire and taken to four hospitals.
The fire started at a detention facility for migrants who tried to illegally cross the border with the US, Mexican newspaper El Heraldo de Mexico reported. The migrants set the fire themselves while trying to escape, according to Mexican newspaper Excelsior.
Mexican President Andres Manuel Lopez Obrador also said that the fire was set by the detained migrants. He told a press conference that they "set fire to mattresses, being unaware that it would cause such a tragedy."
In January, US President Joe Biden said that more resources were needed in order to address the massive influx of migrants over the last two years, after visiting the US southern border.