Abu Huraira reported the 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 overburdened.”
(Bukhari and Muslim.)