Sahih Muslim
Sahih Muslim 120a
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا جَرِيرٌ، عَنْ مَنْصُورٍ، عَنْ أَبِي وَائِلٍ، عَنْ عَبْدِ اللَّهِ، قَالَ قَالَ أُنَاسٌ لِرَسُولِ اللَّهِ صلى الله عليه وسلم يَا رَسُولَ اللَّهِ أَنُؤَاخَذُ بِمَا عَمِلْنَا فِي الْجَاهِلِيَّةِ قَالَ " أَمَّا مَنْ أَحْسَنَ مِنْكُمْ فِي الإِسْلاَمِ فَلاَ يُؤَاخَذُ بِهَا وَمَنْ أَسَاءَ أُخِذَ بِعَمَلِهِ فِي الْجَاهِلِيَّةِ وَالإِسْلاَمِ " .
Uthman ibn Abi Shaybah narrated to us; Jarir narrated to us, from Mansur, from Abu Wa'il, from Abdullah, who said: Some people asked the Messenger of Allah (peace and blessings be upon him): ‘Messenger of Allah, will we be held accountable for what we did during the Age of Ignorance?’ He replied: ‘Whoever does well in Islam will not be held accountable for it; whoever does badly will be held accountable for his deeds in both the Age of Ignorance and Islam.’