From Sahih Muslim (Hadith 3773):
Abu Huraira (Allah be pleased witli him) reported Allah's Prophet (ﷺ) as saying:If anyone emancipates a share in a slave, he is to be completely emancipated if he has money; but if he has none, the slave will be required to work to pay for his freedom, but must not be over-burhened
Reference: Muslim 3773