Sahih Muslim – Hadith No : 332

It is narrated on the authority of Abdullah b. Mas’ud that some people said to the Messenger of Allah (may peace be upon him): Messenger of Allah, would we be held responsible for our deeds committed in the state of ignorance (before embracing Islam)? Upon his he (the Holy Prophet) remarked: He who amongst you performed good deeds in Islam, He would not be held responsible for them (misdeeds which he committed in ignorance) and he who committed evil (even after embracing Islam) would be held responsible or his misdeeds that he committed in the state of ignorance as well as in that of Islam.

Hadith In Arabic Text :

وحدثنا هريم بن عبد الأعلى الأسدي، حدثنا المعتمر بن سليمان، قال سمعت أبي يذكر، عن ثابت، عن أنس، قال لما نزلت هذه الآية ‏.‏ واقتص الحديث ‏.‏ ولم يذكر سعد بن معاذ وزاد فكنا نراه يمشي بين أظهرنا رجل من أهل الجنة ‏.‏

Chapter : The Book of Faith – كتاب الإيمان