Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
If a slave-girl is unmarried and commits fornication, then according to some scholars, the prescribed punishment (hadd) is not applicable to her; rather, she should be beaten as a warning. According to them, "ihsan" (legal protection) refers to her being married. However, the majority opinion is that when a slave-girl is Muslim and commits fornication, whether she is married or unmarried, in both cases her prescribed punishment is fifty lashes.
The instruction to sell her for a trivial price after repeated acts of fornication refers to her humiliation and disgrace, and it is meant to encourage people to avoid such a slave-girl—to get rid of her, even if the price received is only a rope made of hair. Thus, it is narrated from Ali radi Allahu anhu:
He said:
O people! Carry out the prescribed punishments on your male and female slaves, whether they are married or unmarried. The Messenger of Allah sallallahu alayhi wa sallam had a slave-girl who committed fornication, so he ordered me to flog her.
(Sahih Muslim, Hudud, Hadith: 4550(1705))
Although this narration is mawquf (stopped at the Companion), it carries the ruling of marfu‘ (attributed to the Prophet sallallahu alayhi wa sallam).
(Fath al-Bari: 12/199)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 6837