Mishkat al-Masabih 3057
‘Ali said:
You recite this verse, “After a legacy you bequeathe or a debt (Al-Qur’an 4:12),’’ but God’s Messenger decided that a debt should be discharged before a legacy and that the sons of the same mother inherit from one another, but not the sons of one father by different mothers. A man inherits from his brother who has the same father and mother, but not from his brother who has the same father but a different mother. 

Tirmidhi and Ibn Majah transmitted it. In a version by Darimi he said, “Brothers who have the same mother inherit from one another but not sons of the same father but of different mothers, etc."
وَعَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ: إِنَّكُمْ تقرؤون هَذِهِ الْآيَةَ: (مِنْ بَعْدِ وَصِيَّةٍ تُوصُونَ بِهَا أَو دين)
وَإِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَضَى بِالدّينِ قبل الْوَصِيَّةِ وَأَنَّ أَعْيَانَ بَنِي الْأُمِّ يَتَوَارَثُونَ دُونَ بَنِي الْعَلَّاتِ الرَّجُلُ يَرِثُ أَخَاهُ لِأَبِيهِ وَأُمِّهِ دُونَ أَخِيهِ لِأَبِيهِ ". رَوَاهُ التِّرْمِذِيُّ وَابْنُ مَاجَهْ وَفِي رِوَايَةِ الدَّارِمِيِّ: قَالَ: «الْإِخْوَةُ مِنَ الْأُمِّ يَتَوَارَثُونَ دُونَ بَنِي الْعَلَّاتِ. . .» إِلَى آخِره