Abd al-Rahman bin Abdullah bin al-Qasim narrated: Sayyiduna Ibn Mas'ud (may Allah be pleased with him) was asked about a man who freed his slave at the time of death, while he had no wealth other than him and he was in debt. He said: "He (the slave) is to work to earn the equivalent of his value."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9684