The Messenger of Allah ﷺ said, "Whoever frees his share," or he said, "his portion, in a slave, then the slave's complete freedom is from his wealth if he has wealth. But if he has no wealth, the slave is fairly valued, then the slave is required to work to earn the price of the share that has not been freed, without being overburdened."
حدثنا علي بن خشرم أخبرنا عيسى بن يونس عن سعيد بن أبي عروبة عن قتادة عن النضر بن أنس عن بشير بن نهيك
قال رسول الله ﷺ من أعتق نصيبا أو قال شقصا في مملوك فخلاصه في ماله إن كان له مال فإن لم يكن له مال قوم قيمة عدل ثم يستسعى في نصيب الذي لم يعتق غير مشقوق عليه
Agreed upon [by Bukhari and Muslim]. Muslim also narrated it in the Book of Emancipation, chapter: One who frees his share in a slave, no. 1503, from Ali bin Khashram, and Bukhari, no. 2527, from the hadith of Saeed bin Abu Aruba with the same wording.There is also a version on this topic from Abdullah bin Amr, [found in] Ibn Adi's Kamil [3/964].