Language:
كتاب الفرائض
85  
Laws of Inheritance (Al-Faraa'id)
(4)
Chapter: “Whoever leaves some property, then it is for his family.”
(4)
باب قَوْلِ النَّبِيِّ صلى الله عليه وسلم ‏"‏ مَنْ تَرَكَ مَالاً فَلأَهْلِهِ ‏"‏
Sahih al-Bukhari 6731

Narrated Abu Huraira:

The Prophet (ﷺ) said, "I am more closer to the believers than their own selves, so whoever (of them) dies while being in debt and leaves nothing for its repayment, then we are to pay his debts on his behalf and whoever (among the believers) dies leaving some property, then that property is for his heirs."

حَدَّثَنَا عَبْدَانُ، أَخْبَرَنَا عَبْدُ اللَّهِ، أَخْبَرَنَا يُونُسُ، عَنِ ابْنِ شِهَابٍ، حَدَّثَنِي أَبُو سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ أَنَا أَوْلَى، بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ، فَمَنْ مَاتَ وَعَلَيْهِ دَيْنٌ، وَلَمْ يَتْرُكْ وَفَاءً، فَعَلَيْنَا قَضَاؤُهُ، وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6731
In-book reference : Book 85, Hadith 8
USC-MSA web (English) reference : Vol. 8, Book 80, Hadith 723
  (deprecated numbering scheme)