Mr Hichilema defeated his main rival, the outgoing President Edgar Lungu, by more than a million votes.
It was Mr Hichilema’s sixth attempt at winning the presidency. His supporters have been celebrating on the streets of the capital, Lusaka.
Mr Lungu’s Patriotic Front has accepted defeat and congratulated Mr Hichilema.
Earlier, Mr Lungu alleged that the elections were not free and fair.
He said Patriotic Front election officials had been chased from polling stations, leaving votes unprotected.
In its final tally, the electoral commission said Mr Hichilema had won 2,810,777 votes to Mr Lungu’s 1,814,201 in Thursday’s election. There were seven million registered voters.
The landslide win means Mr Hichilema will not have to fight a run-off contest.
“I therefore declare that the said Hichilema to be president of Zambia,” commission chairman Esau Chulu announced at the results centre in Lusaka.
Mr Lungu’s six-year rule was criticised for alleged human rights abuses, corruption, a failing economy and massive unemployment.
Correspondents say Mr Hichilema, 59, tapped into widespread dissatisfaction among voters.
He now faces the daunting challenge of turning around the country’s economic fortunes.
Celebrations which started on Sunday continued until sunrise as Zambia was painted red by supporters of Hakainde Hichilema.
There’s no doubt that that political winds of change were ushered in by young people who are often accused of being reluctant to vote. They turned up in high numbers and generally rejected President Edgar Lungu.
“We want jobs, young people want jobs,” chanted throngs of people as they filled the streets of the capital shortly after Mr Hichilema was declared the seventh president of this copper-rich nation.
There’s no doubt that Mr Hichilema will inherit the rot and will attempt to clean up corruption left by his predecessor.
That’s if President Lungu respects the will of the people and hands over power. He claimed the election wasn’t free and fair after he lost votes in many of his traditional strongholds.
He said elections were characterised by violence, which is in direct contrast with regional and international observers, whose preliminary findings said the elections were relatively peaceful despite pockets of violence, political interference and an uneven playing field which favoured the governing Patriotic Front.
A concession speech hasn’t been made by the incumbent even after losing by close to one million votes. Mr Lungu is expected to approach the courts to challenge the result but the margin of his defeat might make it hard for judges to overturn the result.