كتاب الجنة وصفة نعيمها وأهلها
53
The Book of Paradise, its Description, its Bounties and its Inhabitants
(17)
Chapter: The Deceased Is Shown His Place In Paradise Or The Fire; And Confirmation Of The Torment In The Grave - We Seek Refuge With Allah From That
(17)
بَاب عَرْضِ مَقْعَدِ الْمَيِّتِ مِنْ الْجَنَّةِ أَوْ النَّارِ عَلَيْهِ وَإِثْبَاتِ عَذَابِ الْقَبْرِ وَالتَّعَوُّذِ مِنْهُ

Anas b. Malik reported that Allah's Apostle (ﷺ) said:

When the servant is placed in his grave and his friends retrace their steps. The rest of the hadith is the same as transmitted by Qatada.
حَدَّثَنِي عَمْرُو بْنُ زُرَارَةَ، أَخْبَرَنَا عَبْدُ الْوَهَّابِ، - يَعْنِي ابْنَ عَطَاءٍ - عَنْ سَعِيدٍ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ نَبِيَّ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّ الْعَبْدَ إِذَا وُضِعَ فِي قَبْرِهِ وَتَوَلَّى عَنْهُ أَصْحَابُهُ ‏"‏ ‏.‏ فَذَكَرَ بِمِثْلِ حَدِيثِ شَيْبَانَ عَنْ قَتَادَةَ ‏.‏
Reference : Sahih Muslim 2870 c
In-book reference : Book 53, Hadith 87
USC-MSA web (English) reference : Book 40, Hadith 6864
  (deprecated numbering scheme)