You have embraced Islam along with your past good deeds
Authenticعَنْ حَكِيمِ بْنِ حِزَامٍ رَضِيَ اللَّهُ عَنْهُ، قَالَ: قُلْتُ: يَا رَسُولَ اللَّهِ، أَرَأَيْتَ أَشْيَاءَ كُنْتُ أَتَحَنَّثُ بِهَا فِي الجَاهِلِيَّةِ مِنْ صَدَقَةٍ أَوْ عَتَاقَةٍ، وَصِلَةِ رَحِمٍ، فَهَلْ فِيهَا مِنْ أَجْرٍ؟ فَقَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «أَسْلَمْتَ عَلَى مَا سَلَفَ مِنْ خَيْرٍ».
Hakīm ibn Hizām (may Allah be pleased with him) reported: I said: "O Messenger of Allah, before embracing Islam, I used to do good deeds, like giving in charity, manumitting slaves, and upholding kinship ties. Shall I be rewarded for those deeds?" The Prophet (may Allah’s peace and blessings be upon him) replied: "You have embraced Islam along with your past good deeds."
Explanation
The Prophet (may Allah's peace and blessings be upon him) points out that if a disbeliever embraces Islam, he gets rewarded for the good deeds he used to perform in Jāhiliyyah, before becoming Muslim, like charity, manumission of slaves, and upholding of kinship ties.
Benefits
- The good deeds of a disbeliever will not be rewarded in the Hereafter if he dies as a disbeliever.
Source · Agreed upon
From the Hadith Encyclopedia (hadeethenc.com).