Sahih al-Bukhari 5071
Book 67: Wedlock, Marriage (Nikaah) · Narrated by Ibn Masud
Arabic
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا يَحْيَى، حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي قَيْسٌ، عَنِ ابْنِ مَسْعُودٍ ـ رضى الله عنه ـ قَالَ كُنَّا نَغْزُو مَعَ النَّبِيِّ صلى الله عليه وسلم وَلَيْسَ لَنَا نِسَاءٌ فَقُلْنَا يَا رَسُولَ اللَّهِ أَلاَ نَسْتَخْصِي فَنَهَانَا عَنْ ذَلِكَ.
English translation
Narrated 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 Messenger (ﷺ)! Shall we get castrated?" The Prophet (ﷺ) forbade us to do so
Reference: Sahih al-Bukhari 5071, Book of Wedlock, Marriage (Nikaah). English translation by Dr. Muhammad Muhsin Khan.