Anas bin Malik reported,

The Prophet ﷺ said, "When a servant is placed in his grave and his companions turn away from him, he hears the sound of their sandals as they leave. Two angels come to him and ask, 'What did you used to say about this man, meaning Muhammad ﷺ?'As for the believer, he replies, 'I bear witness that he is the servant of Allah and His Messenger.'He is then told, 'Look at your place in the Fire, Allah has replaced it for you with a place in Paradise.' So he sees them both."

Ahmad 13446

Sahih

حدثنا عبد الوهاب حدثنا سعيد بن أبي عروبة عن قتادة

عن أنس بن مالك

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

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