Ayesha reported,

The Messenger of Allah ﷺ said, "A man may perform the deeds of the people of Paradise, while in the Book he is recorded among the people of the Fire. Then, just before his death, he changes and performs the deeds of the people of the Fire, so he dies and enters the Fire. And a man may perform the deeds of the people of the Fire, while in the Book he is recorded among the people of Paradise. Then, just before his death, he changes and performs the deeds of the people of Paradise, so he dies and enters it."

Ahmad 24762

Sahih

حدثنا سريج وعفان قالا حدثنا حماد بن سلمة عن هشام بن عروة عن أبيه

عن عائشة

أن رسول الله ﷺ قال إن الرجل ليعمل بعمل أهل الجنة وإنه لمكتوب في الكتاب من أهل النار فإذا كان قبل موته تحول فعمل بعمل أهل النار فمات فدخل النار وإن الرجل ليعمل بعمل أهل النار وإنه لمكتوب في الكتاب من أهل الجنة فإذا كان قبل موته تحول فعمل بعمل أهل الجنة فمات فدخلها

أحمد 24762صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Ayesha
Numbering
Darussalam 24762
Ahmad 24762