Sunan Ibn Majah, Book 22, Hadith 2819 (In-Book)

It was narrated that 'Ali said: “The Messenger of Allah ruled that the debts should be paid off before the execution of the will. You recite: '(The distribution in all cases is) after the payment of legacies he may have bequeathed or debts.' The sons of one mother (from the same father) inherit from one another, but not the sons from different mothers (but the same father).”

حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا سُفْيَانُ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْحَارِثِ، عَنْ عَلِيٍّ، قَالَ قَضَى رَسُولُ اللَّهِ صلى الله عليه وسلم بِالدَّيْنِ قَبْلَ الْوَصِيَّةِ وَأَنْتُمْ تَقْرَءُونَهَا ‏{مِنْ بَعْدِ وَصِيَّةٍ يُوصِي بِهَا أَوْ دَيْنٍ }‏ وَإِنَّ أَعْيَانَ بَنِي الأُمِّ لَيَتَوَارَثُونَ دُونَ بَنِي الْعَلاَّتِ ‏.‏

sunnah.com