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.
bayhaqi:21498Abū ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās > Yaḥyá > Yazīd > Muḥammad b. Sālim > al-Shaʿbī > ʿAlī

[Machine] If a woman were to free a male or female slave, and she were to leave behind a male child, then the ownership of that slave would belong to her child, regardless of whether they were male or female. However, if there were no male heirs, then the ownership would return to the woman's guardians. Shurayh said, "The ownership is passed down just like inheritance, but ownership cannot be inherited by a female, except for what she has freed."  

البيهقي:٢١٤٩٨أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ ثنا يَحْيَى أنبأ يَزِيدُ أنبأ مُحَمَّدُ بْنُ سَالِمٍ عَنِ الشَّعْبِيِّ أَنَّ عَلِيًّا ؓ قَالَ

إِذَا أَعْتَقَتِ الْمَرْأَةُ عَبْدًا أَوْ أَمَةً فَهَلَكَتْ وَتَرَكَتْ وَلَدًا ذَكَرًا فَوَلَاءُ ذَلِكَ الْمَوْلَى لِوَلَدِهَا مَا كَانُوا ذُكُورًا فَإِذَا انْقَطَعَتِ الذُّكُورُ رَجَعَ الْوَلَاءُ إِلَى أَوْلِيَائِهَا وَقَالَ شُرَيْحٌ يَمْضِي الْوَلَاءُ عَلَى وَجْهِهِ كَمَا يَمْضِي الْمِيرَاثُ وَلَكِنْ لَا يُورَّثُ الْوَلَاءَ أُنْثَى إِلَّا شَيْئًا أَعْتَقَتْهُ  


See similar narrations below:

Collected by Suyūṭī
suyuti:4-2873bal-Shaʿbiá > ʿAliyyā
Request/Fix translation

  

السيوطي:٤-٢٨٧٣b

"عَنْ الشَّعبِى: أَنَّ عَلِيّا قَالَ: إِذَا أَعْتَقَتِ الْمَرْأَةُ عَبْدًا أَوْ أَمَةً فَهَلَكَتْ وَتَرَكَتْ وَلَدًا ذَكَرًا فَوَلَاءُ ذَلِكَ الْمَوْلَى لِوَلَدِها مَا كَانُوا ذُكُورًا فَإِذَا انْقَطَعَتِ الذُّكُورُ رَجَعَ الْوَلَاءُ إِلَى أَوْلِيَائِها".  

[ق] البيهقى في السنن