Sunan Ibn Majah, Book 15, Hadith 2509 (In-Book) ⓘ
It was narrated from Jabir that the Messenger of Allah said: “Whoever leaves behind money, it is for his heirs, and whoever leaves behind a debt for children, I am nearer to the believers.”
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا سُفْيَانُ، عَنْ جَعْفَرِ بْنِ مُحَمَّدٍ، عَنْ أَبِيهِ، عَنْ جَابِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ وَمَنْ تَرَكَ دَيْنًا أَوْ ضَيَاعًا فَعَلَىَّ وَإِلَىَّ وَأَنَا أَوْلَى بِالْمُؤْمِنِينَ " .
also referenced under: Hadith 2416 (Reference) & Volume 3, Book 15, Hadith 2416 (DarusSalam)