It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that he said: I said: "O Messenger of Allah, I am a young man and I fear falling into sin, while I do not have the means to marry. Will you permit me to castrate myself?" He said: He (peace and blessings be upon him) remained silent at my words. Then I said: "O Messenger of Allah, I am a young man and I do not have the means to marry. Do you permit me to castrate myself?" I said the same a third time, and the Messenger of Allah (peace and blessings be upon him) said: "O Abu Hurayrah, the Pen has dried concerning what you are going to meet; so (whether) you castrate yourself on that basis or leave it."
Imam al-Tabarani (may Allah have mercy on him) said: "No one narrated this hadith from al-Awza'i, from Yunus, except Abdullah bin Kathir, and al-Abbas bin al-Walid al-Khallal is alone in narrating it."
Hadith Referenceالمعجم الأوسط / باب الميم / 6814
Hadith Takhrij«أخرجه البخاري فى «صحيحه» برقم: 5076، والنسائي فى «المجتبى» برقم: 3215 / 4، والبيهقي فى «السنن الكبرى» برقم: 13595، والبزار فى «مسنده» برقم: 7901»