Sayyiduna Anas (may Allah be pleased with him) states: A man came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah, I have committed every kind of evil." The Prophet (peace and blessings be upon him) said: "Do you not testify that there is no deity except Allah Almighty and that Sayyiduna Muhammad (peace and blessings be upon him) is the Messenger of Allah?" He (peace and blessings be upon him) asked this three times. The man said: "Yes (I do testify to it)." The Prophet (peace and blessings be upon him) said: "This will come over that (that is, this testimony will wipe out those sins of yours)."
Abu Ya'la recorded it, and Bazzar recorded something similar, and Tabarani recorded it in al-Mu'jam al-Saghir and al-Mu'jam al-Awsat; the narrators of these narrations are thiqat (trustworthy). (Allamah Haythami says:) I say: Various chains of this narration have already passed in the Book of Faith, in the chapter: "Islam wipes out what came before it (that is, sins)."
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأذكار / 16814
Hadith Gradingمحدثین:إسنادہ صحیح
Hadith Takhrij«اخرجه الطبراني فى المعجم الصغير (1025) اخرجه البزار فى المسند (3067) اخرجه أبو يعلى فى المسند (3433) ، أخرجه الأحاديث المختارة برقم: 1773، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 6114/1»