A man was suspected of having an illicit relationship with a slave woman who had borne a child to the Messenger of Allah ﷺ. The Messenger of Allah ﷺ said to Ali, "Go and strike off his neck."Ali went to him and found him in a well, cooling himself. Ali said to him, "Come out." The man extended his hand to him, and Ali pulled him out, only to find that he was castrated and had no male organ. So Ali held back from him.Then he came to the Prophet ﷺ and said, "Messenger of Allah, he is castrated and has no male organ."
أن رجلا كان يتهم بأم ولد رسول الله ﷺ فقال رسول الله ﷺ لعلي: اذهب فاضرب عنقه. فأتاه علي فإذا هو في ركي يتبرد فيها، فقال له علي: اخرج، فناوله يده، فأخرجه فإذا هو مجبوب ليس له ذكر، فكف علي عنه، ثم أتى النبي ﷺ فقال: يا رسول الله، إنه لمجبوب ما له ذكر.
Muslim narrated it in the Book of Repentance (2771), from Zuhayr bin Harb, who said, "Affan narrated to us, Hammad bin Salama narrated to us, Thabit informed us, from Anas," and he related it.