Emmerson Mnangagwa, the former vice president, is set to be sworn in as president on Friday.
A government source said Mugabe, who is 93, told negotiators he wanted to die in Zimbabwe and had no plans to live in exile.
“It was very emotional for him and he was forceful about it,” said the source, who is not authorised to speak on the details of the negotiated settlement.
“For him, it was very important that he be guaranteed security to stay in the country…although that will not stop him from travelling abroad when he wants to or has to,” the source said.
Mugabe’s rapid downfall was triggered by a battle to succeed him that pitted Mnangagwa against Mugabe’s wife Grace.