I have been a good Muslim and a bad Muslim. Throughout the years I've been to 'omra (a few times) and hajj (once) and read the whole Quran (once) but also been neglecting prayer and doing sin (drinking, gossip, etc…). My faith keeps going up and down, sometimes even going months without prayer (because of bad influence around me).

My friend tells me all my past good deeds have been wiped away because of my bad sins and neglecting prayer. Also that all the performing of faith in Ramadan and hajj/'omra was a waste of time because none of the good deeds from that is counted and is replaced by bad deeds.

My friend did not provide any evidences to support this claim, so I'll ask here: Is there an Islamic basis to this idea that all my past good deeds are wiped away due to my sins? Is this actually an Islamic teaching, or is it based on an incorrect understanding of Islamic fundamentals?

2 Answers 2


This is a matter on which there is disagreement.

According to the Ahl al-Sunnah, sins do not completely wipe out all good deeds, only Kufr (apostasy) does. And some scholars have noted that this is conditional to death on Kufr. Committing major sins (such as drinking and backbiting) is not by itself Kufr. And neglecting prayer out of laziness is also not Kufr according to the majority (although it is Kufr according to some, see If someone do not pray 5 time, is he/she Kafer?).

فمذهب أهل السنة: أن السيئات لا تبطل الحسنات ولا يحبطها شىء إلا الكفر

The madhab of the Ahl al-Sunnah is: That sins do not invalidate good deeds and that nothing renders them worthless them except kufr

Ikmaal al-Mu‘allim bi Fawaa’id Muslim

However, sins will obviously reduce the benefit of your virtues as the balance of deeds shifts towards sins rather than virtues. And some sins can prevent the acceptance of certain good deeds. And some hold that some sins can cancel 'some' good deeds. However this can be remedied by repentance, and a Muslim remains eligible for forgiveness (4:48). And even if he is punished he will eventually be forgiven and admitted into paradise.

The following verse is about wiping out of good deeds because of apostasy:

ومن يرتدد منكم عن دينه فيمت وهو كافر فأولئك حبطت أعمالهم في الدنيا والآخرة وأولئك أصحاب النار هم فيها خالدون

And whoever of you reverts from his religion [to disbelief] and dies while he is a disbeliever - for those, their deeds have become worthless in this world and the Hereafter, and those are the companions of the Fire, they will abide therein eternally.

Quran 2:217

And the following are some verses which can be interpreted to mean that other sins by a Muslim might also invalidate his good deeds - although they can also be interpreted as kufr or lack of acceptance because of insincerity:

يا أيها الذين آمنوا أطيعوا الله وأطيعوا الرسول ولا تبطلوا أعمالكم

O you who have believed, obey Allah and obey the Messenger and do not invalidate your deeds.

Quran 47:33

يا أيها الذين آمنوا لا ترفعوا أصواتكم فوق صوت النبي ولا تجهروا له بالقول كجهر بعضكم لبعض أن تحبط أعمالكم وأنتم لا تشعرون

O you who have believed, do not raise your voices above the voice of the Prophet or be loud to him in speech like the loudness of some of you to others, lest your deeds become worthless while you perceive not.

Quran 49:2

يا أيها الذين آمنوا لا تبطلوا صدقاتكم بالمن والأذى كالذي ينفق ماله رئاء الناس ولا يؤمن بالله واليوم الآخر

O you who have believed, do not invalidate your charities with reminders or injury as does one who spends his wealth [only] to be seen by the people and does not believe in Allah and the Last Day.

Quran 2:264

Below is some evidence from ahadith that in general sins do not wipe out good deeds:

قال أبو بكر الصديق ـ رضى الله عنه ـ وكان ينفق على مسطح بن أثاثة لقرابته منه، وفقره والله لا أنفق على مسطح شيئا أبدا بعد الذي قال لعائشة ما قال، فأنزل الله ‏{‏ولا يأتل أولو الفضل منكم والسعة أن يؤتوا أولي القربى والمساكين والمهاجرين في سبيل الله وليعفوا وليصفحوا ألا تحبون أن يغفر الله لكم والله غفور رحيم‏}‏

Abu Bakr As-Siddiq who used to provide for Mistah bin Uthatha because of the latter's kinship to him and his poverty, said, "By Allah, I will never provide for Mistah anything after what he has said about Aisha".

So Allah revealed:

And let not those of virtue among you and wealth swear not to give [aid] to their relatives and the needy and the emigrants for the cause of Allah, and let them pardon and overlook. Would you not like that Allah should forgive you? And Allah is Forgiving and Merciful.

Quran 24:22


Mistah was among those who had migrated for the sake of Allah. Later however he slandered Aisha. But Allah mentions his migration in the Quran which is evidence that his good deed still counted and was not not erased by the sin which he committed after it.

إنه قد شهد بدرا، وما يدريك لعل الله أن يكون قد اطلع على أهل بدر فقال اعملوا ما شئتم، فقد غفرت لكم

Hatib participated in the battle of Badr, and who knows, perhaps Allah has already looked at the Badr warriors and said, 'Do whatever you like, for I have forgiven you.'


Hatib had spied on the Muslims and tried to send information about them to the enemy. The Prophet ﷺ mentioned his previous virtue of participation in the battle of Badr, which is evidence that his sin of spying did not erase his previous good deeds.

فقال غفر لي بهجرتي إلى نبيه صلى الله عليه وسلم

He replied. Allah granted me pardon for my migration to the Apostle (ﷺ).


This person committed suicide, however his earlier migration was given weight by Allah and because of it he was forgiven.




Indeed, Allah does not do injustice, [even] as much as an atom's weight; while if there is a good deed, He multiplies it and gives from Himself a great reward.

Al-Nisa-18 :

But of no avail is repentance of those who do evil until death approaches any one of them and then he says: 'Now I repent.' Nor is the repentance of those who die in the state of unbelief of any avail to them.

Hence , your deeds do not get erased (according to the first verse above), except if you die in a state of disbelief( according to verse 2).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .