Hadithcore
Mishkat al-Masabih, 3473

Al-Hasan, on Samura’s authority, quoted God’s Messenger as saying, “If anyone kills his slave we will kill him, and if anyone maims his slave we will maim him.” Tirmidhi, Abu Dawud, Ibn Majah and Darimi transmitted it, and Nasa’i added in another version, “If anyone castrates his slave we will castrate him.”

وَعَن الْحسن عَن سَمُرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ قَتَلَ عَبْدَهُ قَتَلْنَاهُ وَمَنْ جَدَعَ عَبْدَهُ جَدَعْنَاهُ» . رَوَاهُ التِّرْمِذِيُّ وَأَبُو دَاوُدَ وَابْنُ مَاجَهْ وَالدَّارِمِيُّ وَزَادَ النَّسَائِيُّ فِي رِوَايَةٍ أُخْرَى: «وَمن خصى عَبده خصيناه»

References1 variant
In-Book Reference
Book 16, Hadith 24