'Amr bin Shu'aib narrated from his father that his grandfather said:
"A man came to the Prophet (ﷺ) screaming. The Messenger of Allah (ﷺ) said to him: 'What is the matter with you?' He said: 'My master saw me kissing a slave woman of his, so he cut off my penis.' The Prophet (ﷺ) said: 'Take me to the man.' He was sought but could not be found, so the Messenger of Allah (ﷺ) said: 'Go, for you are free.' He said: 'Who will protect me, O Messenger of Allah (ﷺ)? What if my master enslaves me again?' The Messenger of Allah (ﷺ) said: 'Your protection will be (incumbent upon) every believer or Muslim.'" (FR)
English reference (FR): Vol. 3, Book 21, Hadith 2680 (FR)
Arabic reference (FR): Book 21, Hadith 2782 (FR)