English : Vol. 5, Book 37, Hadith 4242
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ أَحْسَنَ فِي الإِسْلاَمِ لَمْ يُؤَاخَذْ بِمَا كَانَ فِي الْجَاهِلِيَّةِ وَمَنْ أَسَاءَ أُخِذَ بِالأَوَّلِ وَالآخِرِ "
It was narrated that "Abdullah said:
"We said: "O Messenger of Allah, will we be taken to task for what we did in the Ignorance period?' The Messenger of Allah (ﷺ) said: "Whoever does good in Islam (i.e., after becoming a Muslim) he will not be taken to task for what he did in the Ignorance period, but whoever does evil (i.e., after entering Islam) he will be taken to task for both the former and the latter.'"
Full reference and source
English : Vol. 5, Book 37, Hadith 4242 Arabic : Book 37, Hadith 4383
View source on Sunnah.com (opens in a new tab)