It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that a man came to the Noble Prophet (peace and blessings be upon him) and said: "O Messenger of Allah! If I (accept Islam and) continue to do good deeds in this religion, will I be held accountable for my evils committed during the time of ignorance?" The Prophet (peace and blessings be upon him) said: "When you accept Islam outwardly and inwardly, you will not be held accountable for whatever you did during the time of ignorance. But if you accept Islam outwardly and not inwardly, then you will be held accountable for every sin, past and future."
Hadith Referenceالفتح الربانی / كتاب الإيمان و الإسلام / 118
Hadith Gradingمحدثین:صحیح
Hadith Takhrij«أخرجه البخاري: 6921، ومسلم: 120 ، (انظر مسند أحمد ترقيم الرسالة: 3596 ترقیم بيت الأفكار الدولية: 3596»
Brief Explanation
Imam Nawawi, while explaining this hadith, said: The statement made by the group of researchers regarding this is correct, that by "ihsan" is meant to accept Islam both outwardly and inwardly; that is, when someone becomes a true Muslim, then the evils committed during his state of disbelief are forgiven. The Qur’an, hadith, and the consensus of the Ummah all indicate this reality. And by "wa idha asata" is meant that one does not enter Islam with the heart; in reality, this is a hypocrite, who remains upon his disbelief. Such a person is held accountable for the evils committed both before and after his outward declaration of Islam, because in reality, his state of disbelief continues. (Sharh Muslim li’l-Nawawi: 2/136)