Sayyiduna Amr bin Hamiq Khuzai (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) said: "When Allah Almighty intends good for a servant, He purifies him before his death (that is, He makes his praiseworthy qualities known)." It was asked: What is meant by purifying him before his death? The Prophet Muhammad (peace and blessings be upon him) said: Righteous deeds are opened up for him before his death, until that person becomes pleased with them.
Hadith Referenceصحیح ابن حبان / كتاب البر والإحسان / 342
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الصحيحة» (1114).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم.