Sahih al-Bukhari 4:60
Narrated Jabir:
Allah's Messenger (ﷺ) came to visit me while I was sick and unconscious. He performed ablution and sprinkled the remaining water on me and I became conscious and said, "O Allah's Messenger (ﷺ)! To whom will my inheritance go as I have neither ascendants nor descendants?" Then the Divine verses regarding Fara'id (inheritance) were revealed.
Reference
Sahih al-Bukhari 4:60
In-book reference
Book 4, Hadith 60
Arabic Text
حَدَّثَنَا أَبُو الْوَلِيدِ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ مُحَمَّدِ بْنِ الْمُنْكَدِرِ، قَالَ سَمِعْتُ جَابِرًا، يَقُولُ جَاءَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَعُودُنِي، وَأَنَا مَرِيضٌ لاَ أَعْقِلُ، فَتَوَضَّأَ وَصَبَّ عَلَىَّ مِنْ وَضُوئِهِ، فَعَقَلْتُ فَقُلْتُ يَا رَسُولَ اللَّهِ لِمَنِ الْمِيرَاثُ إِنَّمَا يَرِثُنِي كَلاَلَةٌ. فَنَزَلَتْ آيَةُ الْفَرَائِضِ.