He will be buried at Heroes Acre in Harare after his body remains at his birthplace for a while, to be returned to Harare within a month,
At the funeral, African leaders hailed Mugabe as a liberation hero, while current Zimbabwean president Emmerson Mnangagwa said "our motherland is in tears."
But most seats in the 60,000-capacity stadium were empty.
Many Zimbabweans said they would shun the ceremony because of the repression that marked Mugabe's later rule.
The country's economy is in crisis, with soaring inflation and unemployment, and some blame this on the former leader.
The big issue, however, that was virtually on everybody’s lips was ‘what next for Grace Mugabe?’
"We are happier now that he is gone. Why should I go to his funeral? I don't have fuel," a Harare resident told AFP. "We don't want to hear anything about him anymore. He is the cause of our problems."
Mugabe's body will be viewed by the public in his rural hometown, Kutama, on Sunday, local media report.
Publicists expected to have the right sunshine, enthusiastic crowds, and a fond, emotional farewell to Robert Mugabe at the National Sports Stadium in Harare. That was true, but only up to a point.
As the coffin carrying Zimbabwe's founding father was wheeled into the stadium, it was immediately and uncomfortably clear that only a few thousand members of the public had bothered to show up for this funeral service.
African leaders, past and present, filed into the stadium to applause, alongside veterans of the continent's liberation struggles. Mnangagwa - the man who overthrew Mugabe two years ago - sat just two seats away from Mugabe's widow, Grace.
The public tributes to Mugabe's role as a liberation hero - paid by a succession of speakers including Kenya's President Uhuru Kenyatta - came in sharp contrast to the final words of the Mugabe family's own representative, Walter Chidhakwa, whose voice cracked as he spoke of his uncle's final years after he'd been removed from office.
"He was a sad man. A sad, sad, sad man. It was a hard and excruciating journey."
It was a powerful reference to the clear tensions that still exist between the current government and the Mugabe family.
More than a dozen current and former African leaders attended the funeral, hailing Mugabe as a pan-Africanist who had dedicated his life to the people of Zimbabwe.
Kenyatta said he was unwavering in his insistence that Africa's problems demanded African solutions.
Later the crowds booed and jeered at South African President Cyril Ramaphosa - which appeared to be a reaction to the xenophobic violence across South Africa in the last month.
He acknowledged the boos by saying "in the past two weeks, we as South Africans have been going through a challenging period. We have had acts of violence erupting in some parts of our country… This has led, as I can hear you're responding to, to the deaths and injuries of a number of people."
But he insisted: "We as South Africans are not xenophobic."
The funeral follows a row between the Mugabe family and the government over his burial.
It has now been agreed that he will be buried in the National Heroes' Acre monument in Harare, his family says.
Family spokesman and nephew Leo Mugabe says this should be in about a month, when the new shrine to Mugabe will be built at the existing Heroes' Acre.