Praise be to Allah.
That is not permissible; rather it is an evil deed according to the consensus of Muslim scholars, whether that is within the framework of a marriage contract or otherwise, because she is his mistress or owner.
Ibn Qudaamah (may Allah have mercy on him) said:
It is haraam for a slave to marry his mistress. Ibn al-Mundhir said: The scholars are unanimously agreed that marriage of a woman to her slave is invalid. Al-Athram narrated, with his isnaad from Abu’z-Zubayr, who said: I asked Jaabir about a slave marrying his mistress, and he said: A woman came to ‘Umar ibn al-Khattaab, when we were in al-Jaabiyyah. She had married her slave, and ‘Umar rebuked her and thought of stoning her, and he said: He is not permissible for you.
If a woman owns her husband [i.e., if he is a slave or she bought him, for example], her marriage becomes invalid. End quote.
With regard to the words “It is permissible for a man to be intimate with his slave woman whom he owns, by having intercourse and otherwise, and it is not permissible for a woman to be intimate with her slave, by having intercourse or otherwise,” this is an example of the perfect nature and wisdom of sharee‘ah, because the master is in charge of his slave, in control of him and owns him, and the husband is in charge of his wife and in control of her, and she is subject to his authority and control, somewhat like a prisoner. Hence the slave is not allowed to marry his mistress, because of the contradiction between his being her slave and her husband, and between her being his mistress (owner) and his wife. This is something that is well-known on the basis of common sense and rational thinking to be abhorrent, and Islam, which is the wisest of all ways, is far above allowing such a thing. End quote.
I‘laam al-Muwaqqi‘een (2/66)
Az-Zayla‘i al-Hanafi (may Allah have mercy on him) narrated that there was consensus on the invalidity of a slave’s marriage to his mistress.
See: Tabyeen al-Haqaa’iq (2/109)
It says in al-Mawsoo‘ah al-Fiqhiyyah (23/46-47):
If the owner is a woman and the slave is male, she has no right to be intimate with him or to let him be intimate with her, and he has no right to do any such thing. Rather he is haraam for her, and she is haraam for him, whether she is single or married. Al-Qurtubi said: The scholars are unanimously agreed on that. End quote. If she wants to marry him, she is temporarily prohibited for him, i.e., so long as he is her slave. So if she manumits him or sells him, it becomes permissible for her to marry him, subject to the conditions of marriage. Ibn al-Mundhir narrated that there was scholarly consensus on the invalidity of a woman’s marriage to her slave, and that it is haraam to engage in intercourse and the things that lead to it, such as kissing, embracing, touching and looking with desire. End quote.
Shaykh Ibn Baaz (may Allah have mercy on him) was asked:
In the case of a slave woman, it is permissible for her master to have intercourse with her, but is it permissible for a slave to have intercourse with his mistress, with her permission, because Allah, may He be exalted, says (interpretation of the meaning): “except those (captives and slaves) whom your right hands possess” [an-Nisa’ 4:24]?
That is an evil deed. Rather this applies only to men. Allah, may He be exalted, says (interpretation of the meaning):
“And those who guard their chastity (i.e. private parts, from illegal sexual acts)
Except from their wives or (the captives and slaves) that their right hands possess, for then, they are free from blame”
[al-Mu’minoon 23:5, 6].
What is meant here is slave women. The master has the right to be intimate with his legitimate wife and his legitimate slave woman whom he owns in a legitimate manner according to sharee‘ah. But in the case of a male slave, it is not permissible for him to be intimate with his mistress, or to kiss her or have intercourse with her. This is an evil act according to the consensus of Muslim scholars. He does not have the right to be intimate with his mistress, by intercourse or otherwise. Rather he is to serve her by doing what she instructs him to do, and she does not have to observe hijab in front of him, but he is not a mahram for her. End quote.
And Allah knows best.