Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:33

But let them who find not ˹the means for˺ marriage abstain ˹from sexual relations˺ until Allah enriches them from His bounty. And those who seek a contract ˹for eventual emancipation˺ from among whom your right hands possess - then make a contract with them if you know there is within them goodness and give them from the wealth of Allah which He has given you. And do not compel your slave girls to prostitution, if they desire chastity, to seek ˹thereby˺ the temporary interests of worldly life. And if someone should compel them, then indeed, Allah is ˹to them˺, after their compulsion, Forgiving and Merciful.  

And let those who cannot find the means to marry be continent, ˹those who do not have˺ the bridal money or the means for financial support needed for marriage, ˹let them restrain themselves˺ from fornication, until God enriches them, ˹until˺ He improves their means, out of His bounty, and they marry. And those who seek a written contract ˹of emancipation˺, from among those whom your right hand owns, of male slaves and female slaves, contract with them accordingly, if you know in them any good, such as trustworthiness and the ability to earn ˹income˺ in order to fulfil the amount stated in the written contract, which might be worded for example thus: ‘I contract you for ˹the amount of˺ two thousand to be paid over a period of two months, at one thousand a month, and if you fulfill this, you are a free man’, and the other would say, ‘I accept’; and give them — this is a command for the ˹slaves’˺ owners — out of the wealth of God which He has given you, in the measure that will help them to fulfill their commitment to you (the action of ītā’, ‘giving’, here suggests that some of the amount to which they have committed themselves should be waived). And do not compel your slave-girls, your handmaidens, to prostitution, fornication, when they desire to be chaste, to abstain therefrom (this ‘desire’ is the cause of the ˹act of˺ ‘compulsion’, so that the statement is not properly a conditional), that you may seek, through such compulsion, the transient things of the life of this world — this was revealed regarding ‘Abd Allāh b. Ubayy, who used to force his slave-girls to earn money through fornication. And should anyone compel them, then surely God, after their compulsion, will be Forgiving, to these ˹slave-girls˺, Merciful, to them.
القرآن:٢٤:٣٣

وَلْيَسْتَعْفِفِ الَّذِينَ لَا يَجِدُونَ نِكَاحًا حَتَّىٰ يُغْنِيَهُمُ اللَّهُ مِنْ فَضْلِهِ ۗ وَالَّذِينَ يَبْتَغُونَ الْكِتَابَ مِمَّا مَلَكَتْ أَيْمَانُكُمْ فَكَاتِبُوهُمْ إِنْ عَلِمْتُمْ فِيهِمْ خَيْرًا ۖ وَآتُوهُمْ مِنْ مَالِ اللَّهِ الَّذِي آتَاكُمْ ۚ وَلَا تُكْرِهُوا فَتَيَاتِكُمْ عَلَى الْبِغَاءِ إِنْ أَرَدْنَ تَحَصُّنًا لِتَبْتَغُوا عَرَضَ الْحَيَاةِ الدُّنْيَا ۚ وَمَنْ يُكْرِهْهُنَّ فَإِنَّ اللَّهَ مِنْ بَعْدِ إِكْرَاهِهِنَّ غَفُورٌ رَحِيمٌ  

{وليستعفف الذين لا يجدون نكاحا} ما ينكحون به من مهر ونفقة عن الزنا {حتى يغنيهم الله} يوسع عليهم {من فضله} فينكحون {والذين يبتغون الكتاب} بمعنى المكاتبة {مما ملكت أيمانكم} من العبيد والإماء {فكاتبوهم إن علمتم فيهم خيرا} أي أمانة وقدرة على الكسب لأداء مال الكتابة وصيغتها مثلا: كاتبتك على ألفين في شهرين كل شهر ألف فإذا أديتها فأنت حر فيقول قبلت {وآتوهم} أمر للسادة {من مال الله الذي آتاكم} ما يستعينون به في أداء ما التزموه لكم وفي معنى الإيتاء حط شيء مما التزموه {ولا تكرهوا فتياتكم} إماءكم {على البغاء} الزنا {إن أردن تحصنا} تعففا عنه وهذه الإرادة محل الإكراه فلا مفهوم للشرط {لتبتغوا} بالإكراه {عرض الحياة الدنيا} نزلت في عبد الله بن أبي كان يكره جواريه على الكسب بالزنا {ومن يكرههن فإن الله من بعد إكراههن غفور} لهن {رحيم} بهن.