Sahih Bukhari | Volume 7 | Hadith Number 9

Narrated by Ibn Masud
We used to fight in the holy battles in the company of the Prophet and we had no wives with us. So we said, "O Allah's Apostle! Shall we get castrated?" The Prophet forbade us to do so.