Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrated that a man complained to the Prophet (peace and blessings be upon him) of being unmarried and said: "Should I not castrate myself?" He (peace and blessings be upon him) said: "No. Whoever castrates another or castrates himself is not one of us. Rather, fast, and let the hair of your body grow."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11256