Crowds of flag-waving supporters sang and danced to mariachi music in Mexico City’s main square celebrating the ruling party candidate’s victory.
Sheinbaum, a scientist by training, won around 58-60 percent of votes, according to preliminary official results from the National Electoral Institute.
That was more than 30 percentage points ahead of Galvez, and some 50 percentage points ahead of the only man running, long-shot centrist Jorge Alvarez Maynez.
Voters had flocked to polling stations across the Latin American nation, despite sporadic violence in areas terrorized by ultra-violent drug cartels.
Nearly 100 million people were registered to vote in the world’s most populous Spanish-speaking country, home to 129 million people.
Sheinbaum owes much of her popularity to outgoing President Andres Obrador, a fellow leftist and mentor who has an approval rating of more than 60 percent but is only allowed to serve one term.
He said as well as being the first woman to lead Mexico, she is also the president with possibly the most votes obtained in the history of our country .
After casting her ballot, Sheinbaum revealed she had not voted for herself but for a 93-year-old veteran leftist, Ifigenia Martinez, in recognition of her struggle.
In a nation where politics, crime and corruption are closely entangled, drug cartels went to extreme lengths to ensure that their preferred candidates win.
Voting was suspended in two municipalities in the southern state of Chiapas because of violence.
Sheinbaum has pledged to continue the outgoing president’s controversial hugs not bullets strategy of tackling crime at its roots.
As well as choosing a new president, Mexicans voted for members of Congress, several state governors and myriad local officials — a total of more than 20,000 positions.