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.
abudawud:2905Mūsá b. Ismāʿīl > Ḥammād > ʿAmr b. Dīnār > ʿAwsajah > Ibn ʿAbbās

A man died leaving no heir but a slave whom he had emancipated. The Messenger of Allah ﷺ asked: Has he any heir? They replied: No, except a slave whom he had emancipated. The Messenger of Allah ﷺ assigned his estate to him (the emancipated slave).  

أبو داود:٢٩٠٥حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ حَدَّثَنَا حَمَّادٌ أَخْبَرَنَا عَمْرُو بْنُ دِينَارٍ عَنْ عَوْسَجَةَ عَنِ ابْنِ عَبَّاسٍ

أَنَّ رَجُلاً مَاتَ وَلَمْ يَدَعْ وَارِثًا إِلاَّ غُلاَمًا لَهُ كَانَ أَعْتَقَهُ فَقَالَ رَسُولُ اللَّهِ ﷺ هَلْ لَهُ أَحَدٌ قَالُوا لاَ إِلاَّ غُلاَمًا لَهُ كَانَ أَعْتَقَهُ فَجَعَلَ رَسُولُ اللَّهِ ﷺ مِيرَاثَهُ لَهُ