Sahih Muslim #7023 · The Book of Repentance

Sahih MuslimAnas reported that a person was charged with fornication with the slavegirl of Allah's Messenger
Sahih Muslim · Book 50 · The Book of Repentance
Sahih Muslim · كتاب 50 · كتاب التوبة
Go and strike his neck. 'Ali came to him and he found him in a well making his body cool. 'Ali said to him: Come out, and as he took hold of his hand and brought him out, he found that his sexual organ had been cut. Hadrat 'Ali refrained from striking his neck. He came to Allah's Apostle (ﷺ) and said: Allah's Messenger, he has not even the sexual organ with him.
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا عَفَّانُ، حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، أَخْبَرَنَا ثَابِتٌ، عَنْ أَنَسٍ، أَنَّ رَجُلاً، كَانَ يُتَّهَمُ بِأُمِّ وَلَدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لِعَلِيٍّ ‏
"‏ اذْهَبْ فَاضْرِبْ عُنُقَهُ ‏"‏ ‏.‏ فَأَتَاهُ عَلِيٌّ فَإِذَا هُوَ فِي رَكِيٍّ يَتَبَرَّدُ فِيهَا فَقَالَ لَهُ عَلِيٌّ اخْرُجْ ‏.‏ فَنَاوَلَهُ يَدَهُ فَأَخْرَجَهُ فَإِذَا هُوَ مَجْبُوبٌ لَيْسَ لَهُ ذَكَرٌ فَكَفَّ عَلِيٌّ عَنْهُ ثُمَّ أَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ إِنَّهُ لَمَجْبُوبٌ مَا لَهُ ذَكَرٌ
Reference : Sahih Muslim 7023In-book reference : Book 50, Hadith 68