Hadith on Faith: Good deeds will not benefit a person who dies without faith

Aisha reported: I said, “O Messenger of Allah, in the time of ignorance the son of Jud’an would maintain family ties and feed the poor. Will it benefit him?” The Prophet, peace and blessings be upon him, said, “It will not benefit him. Verily, he never said even for one day: My Lord, forgive my sins on the Day of Judgment.”

Source: Ṣaḥīḥ Muslim 214

Grade: Sahih (authentic) according to Muslim

عَنْ عَائِشَةَ قَالَتْ قُلْتُ يَا رَسُولَ اللَّهِ ابْنُ جُدْعَانَ كَانَ فِي الْجَاهِلِيَّةِ يَصِلُ الرَّحِمَ وَيُطْعِمُ الْمِسْكِينَ فَهَلْ ذَاكَ نَافِعُهُ قَالَ لَا يَنْفَعُهُ إِنَّهُ لَمْ يَقُلْ يَوْمًا رَبِّ اغْفِرْ لِي خَطِيئَتِي يَوْمَ الدِّينِ

214 صحيح مسلم كتاب الإيمان باب الدليل على أن من مات على الكفر لا ينفعه عمل