Language:
كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(8)
Chapter: The killing of Abu Jahl
(8)
باب قَتْلِ أَبِي جَهْلٍ
Sahih al-Bukhari 3978, 3979

Narrated Hisham's father:

It was mentioned before `Aisha that Ibn `Umar attributed the following statement to the Prophet (ﷺ) "The dead person is punished in the grave because of the crying and lamentation Of his family." On that, `Aisha said, "But Allah's Messenger (ﷺ) said, 'The dead person is punished for his crimes and sins while his family cry over him then." She added, "And this is similar to the statement of Allah's Messenger (ﷺ) when he stood by the (edge of the) well which contained the corpses of the pagans killed at Badr, 'They hear what I say.' She added, "But he said now they know very well what I used to tell them was the truth." `Aisha then recited: 'You cannot make the dead hear.' (30.52) and 'You cannot make those who are in their Graves, hear you.' (35.22) that is, when they had taken their places in the (Hell) Fire.

حَدَّثَنِي عُبَيْدُ بْنُ إِسْمَاعِيلَ، حَدَّثَنَا أَبُو أُسَامَةَ، عَنْ هِشَامٍ، عَنْ أَبِيهِ، قَالَ ذُكِرَ عِنْدَ عَائِشَةَ ـ رضى الله عنها ـ أَنَّ ابْنَ عُمَرَ رَفَعَ إِلَى النَّبِيِّ صلى الله عليه وسلم ‏"‏ إِنَّ الْمَيِّتَ يُعَذَّبُ فِي قَبْرِهِ بِبُكَاءِ أَهْلِهِ ‏"‏‏.‏ فَقَالَتْ إِنَّمَا قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّهُ لَيُعَذَّبُ بِخَطِيئَتِهِ وَذَنْبِهِ، وَإِنَّ أَهْلَهُ لَيَبْكُونَ عَلَيْهِ الآنَ ‏"‏‏.‏ قَالَتْ وَذَاكَ مِثْلُ قَوْلِهِ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَامَ عَلَى الْقَلِيبِ وَفِيهِ قَتْلَى بَدْرٍ مِنَ الْمُشْرِكِينَ، فَقَالَ لَهُمْ مَا قَالَ إِنَّهُمْ لَيَسْمَعُونَ مَا أَقُولُ‏.‏ إِنَّمَا قَالَ ‏"‏ إِنَّهُمُ الآنَ لَيَعْلَمُونَ أَنَّ مَا كُنْتُ أَقُولُ لَهُمْ حَقٌّ ‏"‏‏.‏ ثُمَّ قَرَأَتْ ‏{‏إِنَّكَ لاَ تُسْمِعُ الْمَوْتَى‏}‏ ‏{‏وَمَا أَنْتَ بِمُسْمِعٍ مَنْ فِي الْقُبُورِ‏}‏ تَقُولُ حِينَ تَبَوَّءُوا مَقَاعِدَهُمْ مِنَ النَّارِ‏.‏
Reference : Sahih al-Bukhari 3978, 3979
In-book reference : Book 64, Hadith 31
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 316
  (deprecated numbering scheme)