MEXICO CITY—Low turnout overshadowed Mexico’s first formal referendum, a controversial vote proposed by President Andrés Manuel López Obrador that he said would advance efforts to investigate and prosecute wrongdoing of several past presidents.

Just 7% or 6.6 million of Mexico’s 94 million registered voters cast ballots Sunday, well below the 40% required by law for the results to be binding, according to preliminary results released by Mexico’s electoral agency. Nearly 98% of those who participated voted in favor of investigating former presidents.

Despite a majority of voters backing the proposal, the low turnout was seen as a blow for the president.

“It was a political exercise by López Obrador to keep his core supporters mobilized more than anything else,” said Gustavo López Montiel, a political analyst with the Tecnológico de Monterrey university.

Mr. López Obrador said Monday that the vote was a triumph because most voted in favor of the proposal. Although not binding, he said it was a good exercise ahead of a recall vote on his presidential mandate planned for March of next year. His six-year term is due to end in 2024.

Mexico’s Supreme Court modified the question posed to Mexicans to make it deliberately vague, asking whether or not they wanted authorities to look into “the political decisions taken in past years by political players.” But Mr. López Obrador repeatedly said the vote was about investigating and possibly prosecuting the five previous presidents, all from rival political parties.

Mr. López Obrador’s ruling Morena party campaigned across the country for the “yes” vote, in one poster portraying the former presidents as criminals and asking: “Do you want them in jail?” Another one read: “Let’s break their historical pact of impunity.”

On Monday, Morena’s president, Mario Delgado, said he would promote the creation of a “court of the people” to investigate alleged “economic crimes” of past administrations.

Mr. López Obrador won a landslide victory in the 2018 presidential election, promising to root out corruption among political elites, which he said was why Mexico hadn’t become a developed country. Mr. López Obrador’s idea of investigating his predecessors was a rallying cry of his campaign.

Many analysts said the referendum violated due process and presumption of innocence and was more of a political distraction from more serious issues such as drug gang violence and the coronavirus pandemic, which has caused around 250,000 deaths.

These voters in Mexico City were among the 6.6 million of Mexico’s 94 million registered voters who cast ballots on Sunday.

These voters in Mexico City were among the 6.6 million of Mexico’s 94 million registered voters who cast ballots on Sunday.

Photo: Christian Palma/Associated Press

“This referendum is a perfect portrait of López Obrador’s populist ways. The rule of law cannot be subject to a referendum,” said José Woldenberg, a former top electoral official. “If there is evidence, the attorney general’s office must investigate regardless of what the people say. If there is no evidence, why should prosecutors open any inquiry on any citizen?”

Many voters saw the referendum as pointless. “This is just a political circus, a joke. You want the people to say who is guilty and who is not? That cannot be,” said Julia Rodríguez, a clothing designer who said she didn’t vote.

Mr. López Obrador denies that the referendum violated due process and said it deepened Mexico’s participative democracy. He has held informal public consultations in the past, including one that was followed by the cancellation of a $13 billion Mexico City airport project and another that called off construction of a brewery over water use. Sunday’s vote, however, was the first referendum organized by the electoral agency.

The five former presidents governed from 1988 to 2018 in what Mr. López Obrador calls Mexico’s “neoliberal period,” which he blames for many of the country’s problems. They are all from the centrist Institutional Revolutionary Party or the conservative National Action Party.

His accusations against them include the privatization of state companies under President Carlos Salinas de Gortari, and a multibillion-dollar bank bailout under President Ernesto Zedillo. He accused President Vicente Fox of rigging the 2006 presidential election, which Mr. López Obrador lost by a razor-thin margin, and says Felipe Calderón ignored corrupt deals between top security officials and drug lords during his 2006-12 term. He said his predecessor, Enrique Peña Nieto, was bribed by Brazilian construction firm Odebrecht SA with contributions to his 2012 presidential campaign and to secure congressional passage of a landmark oil reform bill.

Mr. Peña Nieto has in the past denied any wrongdoing and allegations of illicit campaign financing. No charges have been filed against any of them.

Messrs. Salinas, Zedillo and Peña Nieto couldn’t be immediately reached to comment and haven’t made public comments. Mr. Calderón has said the vote violated his individual rights and accused Mr. López Obrador of abuse of power. Mr. Fox shrugged off the referendum, saying those going to vote were “stupid.”

Write to Juan Montes at juan.montes@wsj.com