MEXICO CITY — Mexico’s finance minister resigned on Tuesday with a scathing letter that accused President Andrés Manuel López Obrador’s administration of capricious decision-making and conflicts of interest, in a surprise move that could prove a blow to the country’s anemic economy.

The minister, Carlos Urzúa, was widely seen as part of Mr. López Obrador’s inner circle, and served as a crucial reassurance to investors that the leftist president would maintain financial discipline.

In his resignation letter, which he posted on Twitter, he wrote that there were many discrepancies in economic policy, some of them because “in this administration public policies have been made without sufficient evidence.”

Mr. Urzúa, 64, also accused the administration of placing officials with no knowledge of finance in the ministry, motivated by “influential people” in the government “with a patent conflict of interest.”