But deputy prosecutor Soufiane Sliti said Grira was still being investigated for corruption.
Grira had been in jail since September 2011 for corruption cases linked to the Ben Ali regime which was overthrown in a popular uprising that year.
The Tunisian League for the Defence of Human Rights group had called for his release in August due to his poor health.
It said at the time that the Mornaguia prison, where Grira was held, does not have the facilities to provide the necessary treatment for his cancer.
In April, the ousted strongman's brother-in-law, Moncef Trabelsi, who had been jailed for fraud, died in custody of a brain tumour.