It is narrated from Sayyiduna Zayd bin Khalid al-Juhani and Abu Hurayrah (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "When the slave woman of one of you commits adultery, let him flog her; then if she does it again, let him flog her; then if she does it again, let him flog her; then if she does it a fourth time, let him sell her, even if for a rope of hair."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5186