Language:
كتاب فى الاستقراض
43  
Loans, Payment of Loans, Freezing of Property, Bankruptcy
(11)
Chapter: The funeral Salat (prayer) for a dead person in debt
(11)
باب الصَّلاَةِ عَلَى مَنْ تَرَكَ دَيْنًا
Sahih al-Bukhari 2399

Narrated Abu Huraira:

The Prophet (ﷺ) said, "I am closer to the believers than their selves in this world and in the Hereafter, and if you like, you can read Allah's Statement: "The Prophet (ﷺ) is closer to the believers than their own selves." (33.6) So, if a true believer dies and leaves behind some property, it will be for his inheritors (from the father's side), and if he leaves behind some debt to be paid or needy offspring, then they should come to me as I am the guardian of the deceased."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا أَبُو عَامِرٍ، حَدَّثَنَا فُلَيْحٌ، عَنْ هِلاَلِ بْنِ عَلِيٍّ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي عَمْرَةَ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ مَا مِنْ مُؤْمِنٍ إِلاَّ وَأَنَا أَوْلَى بِهِ فِي الدُّنْيَا وَالآخِرَةِ اقْرَءُوا إِنْ شِئْتُمْ ‏{‏النَّبِيُّ أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ‏}‏ فَأَيُّمَا مُؤْمِنٍ مَاتَ وَتَرَكَ مَالاً فَلْيَرِثْهُ عَصَبَتُهُ مَنْ كَانُوا، وَمَنْ تَرَكَ دَيْنًا أَوْ ضَيَاعًا فَلْيَأْتِنِي فَأَنَا مَوْلاَهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 2399
In-book reference : Book 43, Hadith 15
USC-MSA web (English) reference : Vol. 3, Book 41, Hadith 584
  (deprecated numbering scheme)