Question:
Assalamualaikum wrm.wbt.,
Is it true that a non-Muslim when he embraces Islam, all his good deeds before that are also rewarded by Allah SWT?
Answer:
Waalaikumussalam wrm. wbt.
Alhamdulillah, praise and thanks to Allah for the countless blessings He has blessed us all with. Blessings and salutations to the Prophet Muhammad PBUH, his wives, his family, companions and all those that follow his teachings to the day of judgement.
In a hadith narrated from Hakim bin Hizam:
I said to Allah's Messenger (ﷺ), "Before embracing Islam I used to do good deeds like giving in charity, slave-manumitting, and the keeping of good relations with Kith and kin. Shall I be rewarded for those deeds?" The Prophet (ﷺ) replied,
أَسْلَمْتَ عَلَى مَا سَلَفَ مِنْ خَيْرٍ
"You became Muslim with all those good deeds (Without losing their reward)."
Sahih al-Bukhari (1436) and Sahih Muslim (123)
In explaining the above hadith, Ibn Battal in Syarh Sahih al-Bukhari (9/209) states: In this hadith, Allah SWT prioritizes those who embrace Islam from among the People of the Book by rewarding them for their good deeds during the time of ignorance. This is also in line with another hadith of the Prophet PBUH: “When a disbeliever embraces Islam and becomes a good Muslim, then Allah SWT will record all of his good deeds (including before he is a Muslim).”
In another place, he also explained: Some of the scholars said: The above hadith means that for every disbeliever who embraces Islam, all the good deeds that he has done before he becomes a Muslim are recorded. And his transgressions are not recorded. For Islam has deleted any form of disbelief before it and recorded all of his good deeds. (See Syarh Sahih al-Bukhari by Ibn Battal, 9/209)
Imam Badr al-Din al-‘Aini in umdah al-Qari states: And it is narrated that the good deeds of the disbelievers who embrace Islam are accepted and calculated (rewarded as a form of worship). However, if he passes away (remaining) in his disbelief, then all his good deeds are wasted. (See Umdah al-Qari, 8/303)
In another hadith from Abi Sa’id al-Khudri, the Prophet PBUH said:
إِذَا أَسْلَمَ الْعَبْدُ فَحَسُنَ إِسْلَامُهُ كَتَبَ اللَّهُ لَهُ كُلَّ حَسَنَةٍ كَانَ أَزْلَفَهَا وَمُحِيَتْ عَنْهُ كُلُّ سَيِّئَةٍ كَانَ أَزْلَفَهَا
"The Messenger of Allah [SAW] said: 'If a person accepts Islam, such that his Islam is good, Allah will decree reward for every good deed that he did before, and every bad deed that he did before will be erased.”
Sunan al-Nasaie (4912)
Al-Sindi explained the above hadith saying: The hadith shows that the good deeds of a disbeliever are first placed in the state of tawaqquf. If he embraces Islam, then it will be accepted (his deeds are recorded for him). (See Sunan al-Nasaie bi Hasyiyah al-Sindi, 4/480)
There is also an opinion which states that their good deeds are not recorded. This is as stated by al-Maziri: “(A disbeliever) will not be rewarded for his good deeds when he was still a disbeliever. The reason is among the conditions of getting closer to Allah SWT is that he must know to whom he is trying to get close to, while a disbeliever is not so.” (See Fath al-Bari, 1/183)
However, consequently, Imam al-Nawawi asserted: The truth and the opinions of the experts – it has even been cited by some of them that there is an ijma’ on it – for a disbeliever, when he does good, such as gave to charity, maintain their family ties, then he embraces Islam and then passes away as a Muslim, the rewards for them are recorded for him…” (See al-Minhaj fi Syarh Sahih Muslim Ibn al-Hajjaj, 1/141)
This is also stated by al-Hafiz Ibn Hajar; the acceptance of one’s deeds (when he was a disbeliever) depends on whether the disbeliever embraces Islam or not. If he embraces Islam, then his past good deeds are rewarded. This is a strong opinion. This is the opinion held by al-Nawawi, Ibrahim al-Harbi, and others such as al-Qurtubi and Ibn al-Munir from among the muta’akhirin. (See Fath al-Bari, 1/123)
Conclusion
In our opinion, the acceptance of the good deeds of a disbeliever depends on his religious status. If he embraces Islam and then passes away as a Muslim, then his previous good deeds when he was a disbeliever are recorded. If not, then his good deeds are not recorded for him.
May Allah SWT grant us knowledge and understanding as well as firm our faith throughout our lives until we die. Amin.