Urwa bin Zubayr reported,

It was mentioned in the presence of Ayesha رضي الله عنها that Ibn Umar attributed to the Prophet ﷺ the statement that the deceased is punished in his grave because of his family's weeping over him.She said, "He is mistaken. What the Messenger of Allah ﷺ actually said was, 'He is being punished for his own sins and wrongdoings, while his family are weeping over him at this moment.'"

Bukhari 3978

Sahih

حدثني عبيد بن إسماعيل حدثنا أبو أسامة

عن هشام عن أبيه قال

ذكر عند عائشة رضي الله عنها أن ابن عمر رفع إلى النبي ﷺ إن الميت يعذب في قبره ببكاء أهله فقالت وهل إنما قال رسول الله ﷺ إنه ليعذب بخطيئته وذنبه وإن أهله ليبكون عليه الآن

البخاري 3978صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Killing of Abu Jahl
Numbering
Darussalam 3978
Bukhari 3978