He defeated incumbent Peter Mutharika with 58.57% of the vote in Tuesday’s poll, the electoral commission announced late on Saturday.
In February, Malawi’s constitutional court annulled Mr Mutharika’s victory in the May 2019 election, citing vote tampering.
The country was bitterly divided in the run-up to this week’s election.
It is the second African nation to annul a presidential election over irregularities, after Kenya in 2017.
How brave judges rejected a ‘second-rate election’
A quick guide to Malawi
Following the official result on Saturday, Mr Chakwera said his victory was “a win for democracy and justice,” adding: “My heart is bubbling with joy.”
His supporters took to the streets of the Malawian capital, Lilongwe, sounding car horns and letting off fireworks.
Mr Chakwera is expected to be sworn in on Sunday.
Malawi’s new leader will look to heal the nation.
Uncertainty around the result sparked months of tension, which spilled over into clashes between opposition supporters and police.
February’s annulment led some to celebrate, but Mr Mutharika described it as a “serious subversion of justice” which marked the death of the country’s democracy.
There were concerns over the logistics and safety of carrying out an election in the midst of the worldwide coronavirus pandemic.