Sayyiduna Abdullah bin Amr (may Allah be pleased with him) narrates: A man came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah! Permit me to castrate myself." The Prophet (peace and blessings be upon him) said: "The castration of my Ummah is fasting and offering voluntary prayers (at night)."
Imam Ahmad and Imam al-Tabarani recorded this narration, and its narrators are thiqat (trustworthy), though some of its narrators have been criticised.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب النكاح / 7320