It was narrated from Abu Salamah that Abu Hurairah said:
“I said: ‘Messenger of Allah صلی اللہ علیہ وآلہ وسلم, I am a young man and I fear hardship for myself, but I cannot afford to marry; should I castrate myself?” The Prophet صلی اللہ علیہ وآلہ وسلم turned away from him until he said it three times. Then the Prophet صلی اللہ علیہ وآلہ وسلم said: “Abu Hurairah, the pen is dried concerning what you are going to face, so (it is up to you whether) you castrate yourself or not.” (Sahih)
Abu ‘Abdur-Rahman (An-Nasa’i) said: Al-Awza’i did not hear this narration from Az-Zuhri, and this Hadith is SahIi Yunus reported it from Az-Zuhri.