I have heard a lot of people saying that if someone dies as a Muslim and he used to believe in Allah from the core of his heart and also believe in Hazrat Muhammad (sws) but has done a lot of bad deeds (more than his good deeds) then he will be given the punishment for his bad deeds for some time and then he will be sent to heaven for ever after. However, I used to strongly disagree and say that if someone goes to Hell, then he stays there forever and if he goes to heaven then he stays there forever. And what you are saying is exactly what the Christians used to say. But I would like to know the opinion of Mr. Ghamdi on this and if I'm wrong please explain this to me and if I'm right please tell me how to explain this to others. Thank You.
Given below is a translation of an excerpt from Ghamidi's book Mizan from the chapter "Imaniyat". Hopefully it will answer your question:
At various places, in the Qur'an, it has been mentioned that people who deliberately associate partners with God and profess disbelief in Him shall be punished eternally. Similar will be the punishment of a Muslim who kills another Muslim deliberately. People who disobey the laws of inheritance are also promised this doom. This fate will also await those who have committed some similar crimes. No doubt, there will be people who will be taken out of Hell once they complete their term of punishment; however, it is evident from the Qur'an that in order to punish the previously mentioned criminals, Hell will always be kept intact. In spite of this, it can be expected that one day, Hell too shall cease to exist. The reason for this is that its torment is a threat from the Almighty and not a promise and the Almighty certainly has the right to reduce the punishment of these sinners or turn them into dust and ashes and eternally bury them in Hell:
فَأَمَّا الَّذِينَ شَقُواْ فَفِي النَّارِ لَهُمْ فِيهَا زَفِيرٌ وَشَهِيقٌ خَالِدِينَ فِيهَا مَا دَامَتِ السَّمَاوَاتُ وَالأَرْضُ إِلاَّ مَا شَاء رَبُّكَ إِنَّ رَبَّكَ فَعَّالٌ لِّمَا يُرِيدُ (11: 106-107)
Then the damned shall be cast into the Fire; here they will groan and scream like donkeys and shall abide in it as long as the heavens and the earth [of that world] exist unless your Lord ordains otherwise. Indeed, your Lord is able to accomplish what He wants to. (11:106-107)