Anas bin Malik reported,

Do not be impressed by anyone's deeds until you see how his life ends, for a man may spend a stretch of his time, or a portion of his life, doing evil deeds, such that if he died upon them he would die in a state of evil, yet he then turns to righteous deeds and his life is sealed with them. And a servant may spend a stretch of his time, or a portion of his life, doing righteous deeds, such that if he died upon them he would die in a state of goodness, yet he then turns to evil deeds and his life is sealed with them.The narrator said that Humayd once raised this report to the Prophet ﷺ, then later refrained from doing so.

Ahmad 13333

Sahih

حدثنا محمد بن أبي عدي عن حميد قال

قال أنس

لا عليكم أن لا تعجبوا لعمل رجل حتى تعلموا ما يختم له به فقد يعمل الرجل برهة من دهره أو زمانا من عمره عملا سيئا لو مات عليه مات على شر فيتحول إلى عمل صالح فيختم له به وقد يعمل العبد برهة من دهره أو زمانا من عمره عملا صالحا لو مات عليه مات على خير فيتحول إلى عمل سيئ فيختم له به قال وقد رفعه حميد مرة ثم كف عنه

أحمد 13333صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 13333
Ahmad 13333