The election commission gives Mnangagwa 50.8 percent of the vote, barely ahead of opposition leader Nelson Chamisa.
Chamisa is calling the results fake and promises a court challenge.
Before the final results were announced about 1 a.m. Friday, an opposition spokesman appeared on the stage in front of multiple microphones and cameras to denounce the results and say his party has not verified them.
He was shouted down and could scarcely be heard before security escorted him away.
The election commission said turnout was high in most provinces and that a large number of votes had to be rejected.
The commission declared the election an unqualified success, but it also said it deeply regrets the violence between protesters and police that left at least six people dead in Harare.
Mnangagwa was vice president when he took over the presidency when the authoritarian Robert Mugabe was forced from office last year after 40 years.
But Mnangagwa was elected with a bare majority, and Chamisa says he has no interest in being part of a coalition.
Mnangagwa and the ruling ZANU-PF party must try to fix Zimbabwe’s ailing economy and poor international image on its own, while also dealing with a population demanding change after 40 years of Mugabe.
Mnangagwa has also said he will call for an investigation into election violence when hundreds of Chamisa supporters, angry that the election results were postponed, threw rocks at police outside commission headquarters Wednesday.
Police responded with tear gas and water cannons. The army was called in and witnesses say soldiers beat and shot at marchers, leaving at least six dead and 14 wounded.
Chamisa said the place to challenge the election results is in the courts, not in the streets.