Lopez Obrador said that Interior Minister Adan Augusto Lopez would replace him at his usual morning press conference and other public events while he recovered.
Hours earlier the 68-year-old president had appeared in front of journalists without a face mask speaking with a hoarse voice, prompting accusations from his critics of irresponsible behavior.
He said he planned to get tested for Covid-19 but believed he had the flu.
Some social media users wished Lopez Obrador a speedy recovery, while others criticized him for being reckless.
“If he falls seriously ill, he will have the best doctors at his service,” political analyst Viri Rios said in a Twitter post that was shared hundreds of times. “Many journalists in the audience, however, do not even have (health) insurance.”
Lopez Obrador overcame a first bout of Covid-19 in early 2021.
He has received the AstraZeneca vaccine including a booster on December 7.
Like many countries, Mexico is in the grip of a new wave of coronavirus infections following the emergence of the highly contagious Omicron variant and traditional year-end family gatherings.
On Friday, Mexico’s official Covid-19 death toll — the fifth highest in the world — surpassed 300,000, although daily fatalities remain far lower than during previous waves.
The country of 129 million people has reported a total of more than 4.1 million confirmed cases of the coronavirus.
The real figure is believed to be much higher due to the low level of testing.
One of the world’s most popular tourist destinations, Mexico has kept its borders open during the pandemic and does not require any tests or vaccination passes from arriving travelers.