كتاب العتق
20  
The Book of Emancipating Slaves
(3)
Chapter: Al-Wala' (Right of inheritance) belongs to the one who manumits the slave
(3)
باب إِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ
Sahih Muslim 1504 g

'A'isha (Allah's be pleased with her) reported that she had bought Barira from the people of Ansar, but they laid down the condition that the right of inheritance (would vest in them), whereupon Allah's Messenger (ﷺ) said:

The right of inheritance vests with one who shows favour (who emancipates) and Allah's Messenger (may peacebe upon him) gave her the choice (either to retain) her matrimonial alliance or break it). Her husband was a slave. She (Barira also) gave 'A'isha some meat as gift. Allah's Messenger (ﷺ) said: I wish you could prepare (cook) for us out of this meat. 'A'isha said, It has been given as charity to Barira, whereupon he said: That is charity for her and gift for us.
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا حُسَيْنُ بْنُ عَلِيٍّ، عَنْ زَائِدَةَ، عَنْ سِمَاكٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ الْقَاسِمِ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، ‏.‏ أَنَّهَا اشْتَرَتْ بَرِيرَةَ مِنْ أُنَاسٍ مِنَ الأَنْصَارِ ‏.‏ وَاشْتَرَطُوا الْوَلاَءَ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ الْوَلاَءُ لِمَنْ وَلِيَ النِّعْمَةَ ‏"‏ ‏.‏ وَخَيَّرَهَا رَسُولُ اللَّهِ صلى الله عليه وسلم وَكَانَ زَوْجُهَا عَبْدًا وَأَهْدَتْ لِعَائِشَةَ لَحْمًا فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لَوْ صَنَعْتُمْ لَنَا مِنْ هَذَا اللَّحْمِ ‏"‏ ‏.‏ قَالَتْ عَائِشَةُ تُصُدِّقَ بِهِ عَلَى بَرِيرَةَ ‏.‏ فَقَالَ ‏"‏ هُوَ لَهَا صَدَقَةٌ وَلَنَا هَدِيَّةٌ ‏"‏ ‏.‏
Reference : Sahih Muslim 1504g
In-book reference : Book 20, Hadith 13
USC-MSA web (English) reference : Book 9, Hadith 3590
  (deprecated numbering scheme)