Sahih al-Bukhari 2504
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ أَعْتَقَ شِقْصًا لَهُ فِي عَبْدٍ، أُعْتِقَ كُلُّهُ إِنْ كَانَ لَهُ مَالٌ، وَإِلاَّ يُسْتَسْعَ غَيْرَ مَشْقُوقٍ عَلَيْهِ "
Narrated Abu Huraira:
The Prophet (ﷺ) said, "Whoever manumits his share of a jointly possessed slave, it is essential for him to manumit the slave completely if he has sufficient money. Otherwise he should look for some work for the slave (to earn what would enable him to emancipate himself), without overburdening him with work."
Full reference and source
Sahih al-Bukhari 2504 In-book : Book 47, Hadith 20 USC-MSA web (English) : Vol. 3, Book 44, Hadith 682 (deprecated)
View source on Sunnah.com (opens in a new tab)