Shu'bah said: Muhammad bin al-Munkadir asked me my name. I told him: "Shu'bah." He said: Abu Shu'bah narrated to us, from Suwayd bin Muqarrin (may Allah be pleased with him), that a man slapped his slave, or some person, and Suwayd said: Do you not know that the face is greatly sacred? In the time of the Messenger I saw seven brothers who had one slave; one of them slapped the slave, and he (peace and blessings be upon him) ordered the seven: "Set him free."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15804
Husayn bin Abd al-Rahman al-Sulami (may Allah have mercy on him) said: I heard Hilal bin Yasaf (may Allah have mercy on him) say: We used to deal in cloth in the house of Sayyiduna Suwayd bin Muqarrin (may Allah be pleased with him). A slave-girl came and said something to a man, and he slapped her on the face. Sayyiduna Suwayd bin Muqarrin (may Allah be pleased with him) said: "Did you slap this face? We were seven brothers with only one slave; one brother slapped her, and he (peace and blessings be upon him) ordered the seven: 'Set her free.'"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15805
Mu'awiyah bin Suwayd (may Allah have mercy on him) said: I slapped a freed slave of ours and ran away. Then I came back shortly before Zuhr and prayed behind my father. He called him and called me, and said: Take retaliation from him. But he forgave. Then he said: We, the Banu Muqarrin, in the time of the Messenger (peace and blessings be upon him), had only one servant, and one of us slapped her. This reached the Prophet (peace and blessings be upon him), and he said: "Set her free." They said: They have no servant other than her. He (peace and blessings be upon him) said: "Then let them use her service, and when they no longer need her, let her go."
Muslim recorded it in the Sahih from Abu Bakr bin Abi Shaybah. In this there is something of an indication that the command to set free is not obligatory but recommended. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15806