Abdullah bin Masud reported,

We said, "Messenger of Allah..."Ibn Jafar narrated to us, Shuba narrated to us, from Sulayman, who said, I heard Abu Waail narrating from Abdullah, who said,We said, "Messenger of Allah, will we be held accountable for what we did during the time of ignorance?"He replied, "Whoever does well in Islam will not be held accountable for what he did during the time of ignorance, but whoever does evil in Islam will be held accountable for both the former and the latter."

Ahmad 4103

Sahih

حدثنا وكيع وابن نمير قالا حدثنا الأعمش عن أبي وائل

عن عبد الله قال

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

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