A narration in Sunan Abu Da’ood states that the Prophet (ﷺ) said: Do not beat your wife as you beat your slave girl.
The full narration is lengthy so let us take a look at the relevant paragraph from it.
قَالَ قُلْتُ يَا رَسُولَ اللَّهِ إِنَّ لِي امْرَأَةً وَإِنَّ فِي لِسَانِهَا شَيْئًا يَعْنِي الْبَذَاءَ . قَالَ ” فَطَلِّقْهَا إِذًا ” . قَالَ قُلْتُ يَا رَسُولَ اللَّهِ إِنَّ لَهَا صُحْبَةً وَلِي مِنْهَا وَلَدٌ . قَالَ ” فَمُرْهَا – يَقُولُ عِظْهَا – فَإِنْ يَكُ فِيهَا خَيْرٌ فَسَتَفْعَلُ وَلاَ تَضْرِبْ ظَعِينَتَكَ كَضَرْبِكَ أُمَيَّتَكَ
I (the narrator Laqit) then said: Messenger of Allah, I have a wife who has something (wrong) in her tongue, i.e. she is insolent. He said: Then divorce her. I said: Messenger of Allah, she had company with me and I have children from her. He said: Then ask her (to obey you). If there is something good in her, she will do so (obey); and do not beat your wife as you beat your slave-girl.
The full context indicates that this was a way of explaining or conveying the message of not beating the wife. It also does not encourage beating of slave girls.
وإنما فيه النهي عن تبريح الضرب كما يضرب المماليك في عادات من يستجيز ضربهم، ويستعمل سوء الملكة فيهم. وتمثله بضرب المماليك لا يوجب إباحة ضربهم، وإنما جرى ذكره في هذا على طريق الذم لأفعالهم ونهاه عن الاقتداء بها وقد نهى صلى الله عليه وسلم عن ضرب المماليك إلاّ في الحدود وأمرنا بالإحسان إليهم.
It forbids severe beating like the beating of the slaves by the one who beats them and makes wrong use of his authority with regards to them. And the similitude of beating the slaves does not mean permissibility of beating them. The mention of it is made by the way of condemnation of their deeds and it prohibit imitating the same. Verily the Prophet (ﷺ) has prohibited the beating of the slaves except by the way of prescribed punishments (hudood) and he has ordered to be kind towards them.
Likewise as-Sindi states:
، والتشبيه ليس لإباحة ضرب المماليك، بل لأنه مما جرى به عادتهم
And the similitude is not provided in order to denote the permissibility of beating the slaves rather it was utilized because it was general practice (i.e. in seventh century Arabia) for slaved to be beaten.
The statement was spoken as a similitude and the beating of slave was mentioned as an example. If one were to say that so-and-so treats his friends like animals, this would mean that he treats them poorly and would not indicate as to how he treats animals. Perhaps this person is very nice towards animals; the statement is a figure of speech. Similarly, not treating ones wife as a slave-girl is to be understood in like manner.
Moreover, this can be confirmed by the fact that the narrator Laqit Ibn Sabirah had come to the Prophet (ﷺ) as a part of a delegation from Iraq from the tribe of Banu al-Muntafiq. For ‘as you beat your slave-girl’ to be literal, the Prophet (ﷺ) would have to know Laqit Ibn Sabirah quite well from well before and would have to know how he treats his slave-girls and would even have to know if he had any slave girls or not.
Moreover, the Prophet (ﷺ) has explicitly stated as to how to treat the slaves.
Abu Mas’ud al-Ansari reported: “When I was beating my servant, I heard a voice behind me (saying): Abu Mas’ud, bear in mind Allah has more dominance over you than you have upon him. I turned and (found him) to be Allah’s Messenger (ﷺ). I said: Allah’s Messenger, I set him free for the sake of Allah. Thereupon he said: Had you not done that, (the gates of) Hell would have opened for you, or the fire would have burnt you.“
“Zadhan reported that Ibn Umar called his slave and he found the marks (of beating) upon his back. He said to him: I have caused you pain. He said: No. But he (Ibn Umar) said: You are free. He then took hold of something from the earth and said: There is no reward for me even to the weight equal to it. I heard Allah’s Messenger (ﷺ) as saying: He who beats a slave without cognizable offence of his or slaps him, then expiation for it is that he should set him free.“
Narrated Al-Ma’rur: At Ar-Rabadha I met Abu Dhar who was wearing a cloak, and his slave, too, was wearing a similar one. I asked about the reason for it. He replied, “I abused a person by calling his mother with bad names.” The Prophet said to me, ‘O Abu Dhar! Did you abuse him by calling his mother with bad names You still have some characteristics of ignorance. Your slaves are your brothersand Allah has put them under your command. So whoever has a brother under his command should feed him of what he eats and dress him of what he wears. Do not ask them (slaves) to do things beyond their capacity (power) and if you do so, then help them.’
Abu Huraira reported Allah’s Messenger (ﷺ) as saying: “When the slave of anyone amongst you prepares food for him and he serves him after having sat close to (and undergoing the hardship of) heat and smoke, he should make him (the slave) sit along with him and make him eat (along with him), and if the food seems to run short, then he should spare some portion for him (from his own share) – (another narrator) Dawud said:” i. e. a morsel or two”.
Narrated AbuDharr: “The Prophet (ﷺ) said: Feed those of your slaves who please you from what you eat and clothe them with what you clothe yourselves, but sell those who do not please you and do not punish Allah’s creatures.“
Indeed, Allah knows best.