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