Abdullah bin Masud reported,

A man asked the Prophet ﷺ, "Will any of us be held accountable for what he did during the days of ignorance?"He replied, "Whoever does well in Islam will not be held accountable for what he did during the days of ignorance, but whoever does evil in Islam will be held accountable for both the former and the latter."

Ahmad 3886

Sahih

حدثنا عبد الرزاق أخبرنا سفيان عن منصور عن أبي وائل

عن ابن مسعود قال

قال رجل للنبي ﷺ أيؤاخذ أحدنا بما عمل في الجاهلية قال من أحسن في الإسلام لم يؤاخذ بما عمل في الجاهلية ومن أساء في الإسلام أخذ بالأول والآخر

أحمد 3886صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Masud
Numbering
Darussalam 3886
Ahmad 3886