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:18843Abū ʿAbdullāh al-Ḥāfiẓ > Aḥmad b. Muḥammad al-Nasawī > Ḥammād b. Shākir > Muḥammad b. Ismāʿīl > Ibrāhīm b. Mūsá > Hishām > Ibn Jurayj > ʿAṭāʾ > Ibn ʿAbbās

[Machine] And if a slave/ servant migrates from them, meaning the people of war or a slave girl, then both of them are free and they have what the migrants have.  

البيهقي:١٨٨٤٣أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أَخْبَرَنِي أَحْمَدُ بْنُ مُحَمَّدٍ النَّسَوِيُّ ثنا حَمَّادُ بْنُ شَاكِرٍ ثنا مُحَمَّدُ بْنُ إِسْمَاعِيلَ حَدَّثَنِي إِبْرَاهِيمُ بْنُ مُوسَى أنبأ هِشَامٌ عَنِ ابْنِ جُرَيْجٍ قَالَ قَالَ عَطَاءٌ عَنِ ابْنِ عَبَّاسٍ ؓ قَالَ

وَإِنْ هَاجَرَ عَبْدٌ مِنْهُمْ يَعْنِي أَهْلَ الْحَرْبِ أَوْ أَمَةٌ فَهُمَا حُرَّانِ وَلَهُمَا مَا لِلْمُهَاجِرِينَ  

أَخْرَجَهُ الْبُخَارِيُّ فِي الصَّحِيحِ