Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) says that on the day of al-Hudaybiyyah, before the treaty, two slaves came to the Messenger of Allah (peace and blessings be upon him). Their masters wrote: O Muhammad! They have not come out of desire for your religion; they only seek release from slavery. The people said: O Messenger of Allah (peace and blessings be upon him)! They have spoken the truth; let the slaves be returned to them. The Messenger of Allah (peace and blessings be upon him) became angry and said: "O people of Quraysh! I do not think you will desist until Allah, the Lord of Might, sets over you someone who will strike your necks." So he (peace and blessings be upon him) did not return those slaves and said: "They are the freed ones of Allah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18838
Abdullah bin al-Mukaddam al-Thaqafi (may Allah have mercy on him) says that when the Messenger of Allah (peace and blessings be upon him) besieged the people of al-Ta'if, some of their slaves came out to him: Sayyiduna Abu Bakrah (may Allah be pleased with him), who was the slave of al-Harith bin Kaladah, and al-Munba'ith, Yuhannas and Wardan, in a group of their slaves, and they accepted Islam.
When the delegation of the people of al-Ta'if came to the Messenger of Allah (peace and blessings be upon him) and accepted Islam, they said: "O Messenger of Allah (peace and blessings be upon him)! Return to us our slaves who came to you." He (peace and blessings be upon him) said: "They will not be returned, for they are the freed ones of Allah." He only gave them the attribution of the wala' (clientship) of their slaves.
This report is munqati' (its chain is broken).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18839
Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says that on the day of al-Ta'if the Messenger of Allah (peace and blessings be upon him) set free all the slaves of the polytheists who came to him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18840
Miqsam narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that on the occasion of al-Ta'if four slaves fled to the Prophet (peace and blessings be upon him), and he set them free.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18841
Miqsam narrates from Abdullah bin Abbas (may Allah be pleased with them both) that two slaves of al-Ta'if accepted Islam, and he (peace and blessings be upon him) set both of them free; one of them was Abu Bakrah (may Allah be pleased with him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18842
Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) says that if a male or female slave of the people at war comes as an emigrant, they are both free and they will receive the rights of the Muhajirun.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18843