It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
"Whoever frees his share of a slave or part of his share, must pay from his wealth if he has any wealth if he has any wealth (in order to buy the rest of the slave's freedom). If he does not have wealth, then the slave should be asked to work for the price (of his freedom), without that causing him too much hardship."
English reference: Vol. 3, Book 19, Hadith 2527
Arabic reference: Book 19, Hadith 2623