Hakeem bin Hizam said, "Messenger of Allah, what do you think of certain acts of devotion I used to perform in the days of ignorance, such as giving charity, freeing slaves, and maintaining ties of kinship? Will I receive any reward for them?"The Prophet ﷺ replied, "You have embraced Islam along with all the good you previously did."In another narration, Hakeem bin Hizam freed one hundred slaves during the days of ignorance and gave one hundred camels to be ridden in the way of good. Then in Islam he freed another one hundred slaves and gave another one hundred camels. Afterward he came to the Prophet ﷺ and mentioned something similar to the previous account.
قلت: يا رسول الله، أرأيت أشياء، كنت أتحنث بها في الجاهلية من صدقة أو عتاقة، وصلة رحم، فهل فيها من أجر؛ فقال النبي ﷺ: أسلمت على ما سلف من خير. وفي رواية: أن حكيم بن حزام أعتق في الجاهلية مائة رقبة، وحمل على مائة بعير ثم أعتق في الإسلام مائة رقبة، وحمل على مائة بعير، ثم أتى النبي ﷺ، فذكر نحو حديثه.
Bukhari narrated it in the Book of Zakat (1436), and Muslim in the Book of Iman (123), both from the hadith of Ibn Shihab Zuhri, who said, Urwa bin Zubayr informed me, that Hakeem bin Hizam, and he mentioned something similar. The second narration is found in Bukhari (2538) and Muslim, both from the hadith of Hisham bin Urwa, from his father, from him. In one narration he said, "By Allah, I did not leave anything I used to do in the Jahiliyyah without doing something similar to it in Islam."His saying "tahannuth" means devotion in worship. As for his saying "You have become Muslim with the good you did before," most scholars have interpreted this. Harbi said, "The good you did before is credited to you, just as one says, 'I became a Muslim with a thousand dirhams,' meaning on condition that he keeps them for himself." Qurtubi said, "What Harbi said is the most fitting and most appropriate interpretation."