"Emmerson Dambudzo Mnangagwa is duly declared the victor of the presidential elections held on the 30th of July 2018", Malaba said in his ruling.
But the vote has once again left the nation polarized after violence flared on the streets of Harare, and Chamisa, who leads the opposition Movement for Democratic Change (MDC), mounted his legal challenge.
Mugabe's successor, Mnangagwa, won with 50.8% of the vote - just enough to avoid a run-off against the MDC's Nelson Chamisa, who scored 44.3%.
Chamisa's inauguration will take place on Sunday.
After the ruling, the European Union issued a statement saying all parties should accept the verdict, adding that the new government needed to push through electoral reforms after a vote that had "revealed improvements as well as challenges".
Paul Mangwana, a ZANU-PF spokesman, said outside the court: "We are ecstatic..."
President Mnangagwa contends that Mr Chamisa's petition is premised on alleged mathematical anomalies, which have no factual basis.
The nine judges delivered the unanimous verdict at the court amid tight security, though no protests were reported after the case.
He has to tell Zimbabweans how he will restore confidence in the country's electoral system and important institutions of the State that are perceived to be appendages of Zanu PF.
"Let us put whatever differences we might have behind us. Your will is sacred & we'll listen to you on the path of peace & course of action to be taken to rescue our lovely Zimbabwe from the jaws of poverty, corruption & dishonesty".
The court said it was up to the opposition to prove its claims and it failed to do so, saying the best evidence would have been the content of the sealed ballot boxes, but that route was not pursued.
Responding to Mnangagwa's comments on Twitter that his door and arms were open to Chamisa, the 40-year-old politician said any talks with the ruling party could only be about resolving the president's legitimacy and "vicious cycle of disputed elections".
This averment was echoed by the Zimbabwe Electoral Commission lawyer Mr Tawanda Kanengoni.
Chamisa says he won the election with 2.6 million votes compared with two million for Mnangagwa but he has provided no evidence.
Mnangagwa took over for Mugabe after the latter was ousted in November for ordering violence against his own citizens.
A credible vote is key to lifting global sanctions as the southern African nation tries to move away from the long shadow of Robert Mugabe's 37-year rule.
In response to Chamisa's application, Zec's lawyer Tawanda Kanengoni, who was assisted by Charles Nyika, denied Mnangagwa rigged the elections, claiming Mpofu's evidence of rigging was based on wrong analysis of the figures of the voter turnout percentage and the number of registered voters.