The former mayor of Mexico City winning between 53% and 53.8% of the vote, according to a projection by the National Electoral Institute, based on a sample of polling stations.
It gave Ricardo Anaya of the conservative National Action Party (PAN) between 22.1% and 22.8%, Jose Antonio Meade of the ruling Institutional Revolutionary Party (PRI) between 15.7% and 16.3%, and independent candidate Jaime Rodriguez between 5.3% and 5.5%.
Governing party candidate Mr Meade conceded the election, saying Mr Lopez Obrador bears the responsibility of the next government.
For the good of Mexico, I wish him the very best of success, Mr Meade said.
Opposition candidate and conservative Ricardo Anaya has also congratulated Mr Lopez Obrador on his win.
Mr Anaya said in a televised speech that the trend favours Mr Lopez Obrador, adding I recognise his triumph.
The result is a shift to the left for Mexico and a big break with the PRI and PAN which, between them, have governed the country for nearly a century.
Mr Lopez Obrador, 65, has promised to rejuvenate Mexico’s economy and polls show that voters are trusting his word.
He has vowed to transform Mexico, reduce its dependence on the US, rule for the poor and overthrow the mafia of power he says have looted the country.
Mr Lopez Obrador enjoyed a wide lead in opinion polls throughout the campaign, his third for the presidency.
News Source SkyNews