Imports rose 22.8 percent to 506.87 billion dollars, leaving the trade deficit at 27.309 billion dollars, the agency said in its monthly trade balance report.
In a separate report, Mexico's Banorte financial group said global price distortions continue to affect trade flows, with some signs of "cooling off."
Moderation in global demand could be due to "greater monetary tightening" by central banks around the world, among other things, Banorte said.
"Considering all of the above, we believe that trade is likely to slow in the fourth quarter of 2022 and into 2023, in line with our general view of economic activity," said the financial group.
Mexico, the second largest economy in Latin America after Brazil, depends to a large extent on economic cycles in the United States.
The Mexican economy grew by 4.8 percent in 2021, after an 8.2-percent fall from the previous year due to the COVID-19 pandemic. The country's economy is forecast to grow by 2.1 percent this year and 2.1 percent in 2023, according to the World Bank.
Latest comments