Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tirmidhi:2122Ibn Abū ʿUmar > Sufyān b. ʿUyaynah > Abū Isḥāq al-Hamdānī > al-Ḥārith > ʿAlī

"The Prophet ﷺ judged with the debt before the will, and you people recite the will before the debt."  

الترمذي:٢١٢٢حَدَّثَنَا ابْنُ أَبِي عُمَرَ حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ عَنْ أَبِي إِسْحَاقَ الْهَمْدَانِيِّ عَنِ الْحَارِثِ عَنْ عَلِيٍّ

أَنَّ النَّبِيَّ ﷺ قَضَى بِالدَّيْنِ قَبْلَ الْوَصِيَّةِ وَأَنْتُمْ تَقْرَءُونَ الْوَصِيَّةَ قَبْلَ الدَّيْنِ  

قَالَ أَبُو عِيسَى وَالْعَمَلُ عَلَى هَذَا عِنْدَ عَامَّةِ أَهْلِ الْعِلْمِ أَنَّهُ يُبْدَأُ بِالدَّيْنِ قَبْلَ الْوَصِيَّةِ

See similar narrations below:

Collected by Aḥmad
ahmad:595Sufyān > Abū Isḥāq > al-Ḥārith > ʿAlī Qaḍá Muḥammad ﷺ > al-Dayn Qabl al-Waṣiyyah And ʾAntum Taqraʾūn al-Waṣiyyah Qabl al-Dayn

Muhammad ﷺ ruled that debts must be paid before carrying art bequests, but you read the will before debts are paid off. [And he ruled] that sons from the same mother inherit from one another, but sons from different mothers do not.  

أحمد:٥٩٥حَدَّثَنَا سُفْيَانُ عَنْ أَبِي إِسْحَاقَ عَنِ الْحَارِثِ عَنْ عَلِيٍّ قَضَى مُحَمَّدٌ ﷺ

أَنَّ الدَّيْنَ قَبْلَ الْوَصِيَّةِ وَأَنْتُمْ تَقْرَءُونَ الْوَصِيَّةَ قَبْلَ الدَّيْنِ وَأَنَّ أَعْيَانَ بَنِي الْأُمِّ يَتَوَارَثُونَ دُونَ بَنِي الْعَلاتِ