Abu Masud Ansari reported,

Abu Masud reported, "I was beating a slave boy of mine when I heard a voice behind me saying, 'Know, Abu Masud.'" Ibn al-Muthanna said that it was repeated twice. The voice said, "Allah has more power over you than you have over him."Abu Masud continued, "I turned around, and there was the Prophet ﷺ. I said, 'Messenger of Allah, he is free for the sake of Allah the Exalted.'"The Prophet ﷺ replied, "Had you not done so, the Fire would have scorched you," or, "the Fire would have touched you."In another version he said, "I was beating a black slave of mine with a whip," and he did not mention the matter of setting him free.

Abu Dawud 5160

Sahih

حدثنا أبو كامل حدثنا عبد الواحد عن الأعمش بإسناده ومعناه نحوه قال كنت أضرب غلاما لي أسود بالسوط ولم يذكر أمر العتق

أبو داود 5160صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Manners
Chapter
Right of the slave
Numbering
Darussalam 5160
Abu Dawud 5160