All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
One Hadeeth says: "Death is an expiation for every Muslim." The wording of another narration reads: "for every believer," and a third narration reads "for every sin." This Hadeeth is narrated in Shu‘ab Al-’Eemaan compiled by Al-Bayhaqi and in Musnad Ash-Shihaab compiled by Al-Qudhaa‘i .
Al-Munaawi mentioned on the authority of Ibn Al-Jawzi that some other narrations indicate that the word “death” refers to the plague, because they often used the word death to mean the plague.
Al-Ghazzaali held that the Prophet, sallallaahu ‘alayhi wa sallam, meant in this Hadeeth that for the true Muslim, one who believes sincerely and does not harm anyone verbally or physically, death expiates his minor sins as long as he did not commit major sins and observed his religious obligations. This is for a Muslim who behaves like a true believer and does not commit sins, except minor ones.
Al-Ghazzaali then mentioned the scholars’ varying opinions about the authenticity of the Hadeeth, whether it is Saheeh (Authentic), Hasan (Sound), or fabricated.
Allaah Knows best.