While I was beating a slave of mine, I suddenly heard a voice behind me saying, "Know, Abu Masud," three times. I turned around, and there was the Messenger of Allah ﷺ.He said, "By Allah, Allah has more power over you than you have over this boy."I then swore that I would never beat a slave again.
حدثنا عبد الرزاق قال حدثنا سفيان عن الأعمش عن إبراهيم التيمي عن أبيه
بينا أنا أضرب غلاما لي إذ سمعت صوتا من ورائي اعلم أبا مسعود ثلاثا فالتفت فإذا رسول الله ﷺ فقال والله لله أقدر عليك منك على هذا قال فحلفت أن لا أضرب مملوكا أبدا
Its isnad is sahih. Ibrahim Taymi is Ibn Yazid bin Sharik bin Tariq, a trustworthy and virtuous man, as was his father, and it is said that his father reached the pre-Islamic era.The hadith was narrated by Muslim, 3/1280, no. 1659, in the Book of Faith, chapter on treating slaves kindly, by Abu Dawud, 4/340, no. 5159, and by Tirmidhi, 4/335, no. 1948, who said, hasan sahih, and by Bayhaqi, 8/10.