عَنْ حَكِيمِ بْنِ حِزَامٍ رَضِيَ اللَّهُ عَنْهُ، قَالَ:
قُلْتُ: يَا رَسُولَ اللَّهِ، أَرَأَيْتَ أَشْيَاءَ كُنْتُ أَتَحَنَّثُ بِهَا فِي الجَاهِلِيَّةِ مِنْ صَدَقَةٍ أَوْ عَتَاقَةٍ، وَصِلَةِ رَحِمٍ، فَهَلْ فِيهَا مِنْ أَجْرٍ؟ فَقَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «أَسْلَمْتَ عَلَى مَا سَلَفَ مِنْ خَيْرٍ».
[صحيح] - [متفق عليه] - [صحيح البخاري: 1436]
المزيــد ...
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."
[Authentic hadith] - [Narrated by Bukhari & Muslim] - [Sahih Bukhari - 1436]
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.