Sunan an-Nasa'i, Book 45, Hadith 31 (Nasa'i 4746)

It was narrated from Samurah that the Messenger of Allah said:

"Whoever kills his slave, we will kill him: whoever mutilates (his slave). We will mutilate him, and whoever castrates (his slave), we will castrate him."