كتاب الجنائز
11  
The Book of Prayer - Funerals
(9)
Chapter: The deceased is tormented because of his family's crying for him
(9)
باب الْمَيِّتُ يُعَذَّبُ بِبُكَاءِ أَهْلِهِ عَلَيْهِ ‏
Sahih Muslim 932 c

'Amra daughter of 'Abd al Rahman narrated that she heard (from) 'A'isha and made a mention to her about 'Abdullah b. 'Umar as saying:

The dead is punished because of the lamentation of the living. Upon this 'A'isha said: May Allah have mercy upon the father of 'Abd al-Rahman (Ibn 'Umar). He did not tell a lie, but he forgot or made a mistake. The Messenger of Allah (ﷺ) happened to pass by a (dead) Jewess who was being lamented. Upon this he said: They weep over her and she is being punished in the grave.
وَحَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، عَنْ مَالِكِ بْنِ أَنَسٍ، فِيمَا قُرِئَ عَلَيْهِ عَنْ عَبْدِ اللَّهِ بْنِ، أَبِي بَكْرٍ عَنْ أَبِيهِ، عَنْ عَمْرَةَ بِنْتِ عَبْدِ الرَّحْمَنِ، أَنَّهَا أَخْبَرَتْهُ أَنَّهَا، سَمِعَتْ عَائِشَةَ، وَذُكِرَ، لَهَا أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، يَقُولُ إِنَّ الْمَيِّتَ لَيُعَذَّبُ بِبُكَاءِ الْحَىِّ ‏.‏ فَقَالَتْ عَائِشَةُ يَغْفِرُ اللَّهُ لأَبِي عَبْدِ الرَّحْمَنِ أَمَا إِنَّهُ لَمْ يَكْذِبْ وَلَكِنَّهُ نَسِيَ أَوْ أَخْطَأَ إِنَّمَا مَرَّ رَسُولُ اللَّهِ صلى الله عليه وسلم عَلَى يَهُودِيَّةٍ يُبْكَى عَلَيْهَا فَقَالَ ‏ "‏ إِنَّهُمْ لَيَبْكُونَ عَلَيْهَا وَإِنَّهَا لَتُعَذَّبُ فِي قَبْرِهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 932c
In-book reference : Book 11, Hadith 34
USC-MSA web (English) reference : Book 4, Hadith 2029
  (deprecated numbering scheme)