And whoever of you have not the means wherewith to wed free believing women, they may wed believing girls from among those whom your right hands possess, and Allah (swt) has full knowledge about your faith.
(… بَعْضُكُم مِّن بَعْضٍ …) (…You are of one another…): You are of one religion, so you are equal in this regard, hence, whenever you fell in an urge, you may marry a one whom your right hand possesses.
(… فَانكِحُوهُنَّ بِإِذْنِ أَهْلِهِنَّ وَآتُوهُنَّ أُجُورَهُنَّ بِالْمَعْرُوفِ …) (…So marry them with the permission of their people and give them their due compensation according to what is acceptable.…): Wed them with the permission of their own folk (guardians) and give them their due in a good manner.
(… مُحْصَنَاتٍ غَيْرَ مُسَافِحَاتٍ وَلَا مُتَّخِذَاتِ أَخْدَانٍ …) (…([They should be] chaste, neither [of] those who commit unlawful intercourse randomly nor those who take [secret] lovers.…): They should be chaste, not fornicators, nor promiscuous. For the Arabs before Islam, it was allowed to take a secret lover but they forbid to have intercourse randomly with anyone whenever invited to.
(… فَإِذَا أُحْصِنَّ فَإِنْ أَتَيْنَ بِفَاحِشَةٍ فَعَلَيْهِنَّ نِصْفُ مَا عَلَى الْمُحْصَنَاتِ مِنَ الْعَذَابِ …) (…But once they are sheltered in marriage, if they should commit adultery, then for them is half the punishment for free unmarried women.…): And after they have been taken in wedlock, if they commit adultery, their punishment is half that for free unmarried women.
(… ذَٰلِكَ لِمَنْ خَشِيَ الْعَنَتَ مِنكُمْ …) (…This is for him among you who fears sin…): This is for the one who fears that he will commit fornication because of the predominance of lust so that he avoids the punishment in this world and in the Hereafter.
Therefore, Allah (swt) has legislated to marry a slave-girl in two conditions: has not the means wherewith to wed free believing women and afraid of being harmed in his religion.
(… وَأَن تَصْبِرُوا خَيْرٌ لَّكُمْ …) (…but to be patient is better for you…): But it is better for you that you practice self-restraint than to marry a slave-girl because then you will have slave-children.