The blunt admission came as visiting US officials called for a "more agile" joint approach to combating drug trafficking by powerful Mexican cartels.
"Mexico has been the champion of the production of methamphetamine, and now fentanyl," Felipe de Jesus Gallo said.
That had been "the source of the greatest wealth and power" for Mexican criminal organizations, he added.
According to the US Drug Enforcement Administration (DEA), Mexican cartels -- using chemicals largely sourced from China -- are mainly responsible for fentanyl trafficked into the United States.
President Andres Manuel Lopez Obrador has pledged to work with the United States to tackle the problem, while downplaying the extent of fentanyl production in Mexico.
His government stresses that the chemical precursors used to make the powerful synthetic opioid are not manufactured in Mexico but come from abroad.
Visiting American officials on Tuesday urged increased cooperation to tackle trafficking of a drug behind tens of thousands of overdose deaths each year in the United States.
"We are in the middle of a global crisis of illicit synthetic drugs," said Chris Landberg, deputy assistant secretary in the US Bureau of International Narcotics and Law Enforcement Affairs.
The United States was working hard to reduce demand for illegal narcotics, he told law enforcement officials from both countries gathered in Mexico City.
"But the United States is not the only country at risk and we need additional support to combat the global supply of illicit drugs," he added.
"We have to recognize that criminal organizations adapt quickly and we need a more agile and comprehensive approach," Landberg said.