It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The earnings of slave girls are unlawful."
And it is narrated in the Sahih, from the hadith of Sayyiduna Abu Hurayrah (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) forbade the earnings of slave girls.