A three-week-long heat wave this month strained the energy grid with record demand, forced authorities to suspend classes in some areas and left many Mexicans sweltering.
Over two-thirds of the deaths came the week of June 18-24, with the remainder the previous week, the ministry said in a report on extreme temperatures. During the same period last year just one heat-related fatality was registered.
Nearly all the deaths were attributed to heat stroke, with a handful from dehydration. Around 64% of the deaths occurred in northern state of Nuevo Leon bordering Texas. Most of the rest were in neighboring Tamaulipas and Veracruz on the Gulf coast.
In recent days, temperatures have fallen as the rainy season has brought much-needed precipitation.
However, some northern cities are still seeing high temperatures. In the state of Sonora, the town of Aconchi saw highs of 49 degrees Celsius (120 Fahrenheit) on Wednesday.