Language:
كتاب الفرائض
85  
Laws of Inheritance (Al-Faraa'id)
(16)
Chapter: Kindred by blood
(16)
باب ذَوِي الأَرْحَامِ
Sahih al-Bukhari 6747

Narrated Ibn `Abbas:

Regarding the Holy Verse:--'And to everyone, We have appointed heirs..' And:-- (4.33) 'To those also to Whom your right hands have pledged.' (4.33) When the emigrants came to Medina, the Ansar used to be the heir of the emigrants (and vice versa) instead of their own kindred by blood (Dhawl-l-arham), and that was because of the bond of brotherhood which the Prophet (ﷺ) had established between them, i.e. the Ansar and the emigrants. But when the Divine Verse:-- 'And to everyone We have appointed heirs,' (4.33) was revealed, it cancelled the other, order i.e. 'To those also, to whom Your right hands have pledged.'

حَدَّثَنِي إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ قُلْتُ لأَبِي أُسَامَةَ حَدَّثَكُمْ إِدْرِيسُ، حَدَّثَنَا طَلْحَةُ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، ‏{‏وَلِكُلٍّ جَعَلْنَا مَوَالِيَ‏}‏{‏وَالَّذِينَ عَقَدَتْ أَيْمَانُكُمْ‏}‏ قَالَ كَانَ الْمُهَاجِرُونَ حِينَ قَدِمُوا الْمَدِينَةَ يَرِثُ الأَنْصَارِيُّ الْمُهَاجِرِيَّ دُونَ ذَوِي رَحِمِهِ لِلأُخُوَّةِ الَّتِي آخَى النَّبِيُّ صلى الله عليه وسلم بَيْنَهُمْ فَلَمَّا نَزَلَتْ ‏{‏جَعَلْنَا مَوَالِيَ‏}‏ قَالَ نَسَخَتْهَا ‏{‏وَالَّذِينَ عَقَدَتْ أَيْمَانُكُمْ‏}‏
Reference : Sahih al-Bukhari 6747
In-book reference : Book 85, Hadith 24
USC-MSA web (English) reference : Vol. 8, Book 80, Hadith 739
  (deprecated numbering scheme)