Sunan an-Nasa'i, Volume 4, Book 26, Hadith 3217 (DarusSalam)

Narrated Abu Salamah: It was narrated from Abu Salamah that Abu Hurairah said: "I said: 'O Messenger of Allah, I am a young man and I fear hardship for myself, but I cannot afford to marry; should I castrate myself?'" The Prophet turned away from him until he said it three times. Then the Prophet said: "O Abu Hurairah, the pen is dried concerning what you are going to face, so (it is up to you whether) you castrate yourself or not." Abu Abdur-Rahman (An-Nasai) said: Al-Awzai did not hear this narration from Az-Zuhri, and this hadith is sahih, Yunus reported it from Az-Zuhri.

أَخْبَرَنَا يَحْيَى بْنُ مُوسَى، قَالَ حَدَّثَنَا أَنَسُ بْنُ عِيَاضٍ، قَالَ حَدَّثَنَا الأَوْزَاعِيُّ، عَنِ ابْنِ شِهَابٍ، عَنْ أَبِي سَلَمَةَ، أَنَّ أَبَا هُرَيْرَةَ، قَالَ قُلْتُ يَا رَسُولَ اللَّهِ إِنِّي رَجُلٌ شَابٌّ قَدْ خَشِيتُ عَلَى نَفْسِي الْعَنَتَ وَلاَ أَجِدُ طَوْلاً أَتَزَوَّجُ النِّسَاءَ أَفَأَخْتَصِي فَأَعْرَضَ عَنْهُ النَّبِيُّ صلى الله عليه وسلم حَتَّى قَالَ ثَلاَثًا فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏ "‏ يَا أَبَا هُرَيْرَةَ جَفَّ الْقَلَمُ بِمَا أَنْتَ لاَقٍ فَاخْتَصِ عَلَى ذَلِكَ أَوْ دَعْ ‏" ‏ ‏.‏ قَالَ أَبُو عَبْدِ الرَّحْمَنِ الأَوْزَاعِيُّ لَمْ يَسْمَعْ هَذَا الْحَدِيثَ مِنَ الزُّهْرِيِّ وَهَذَا حَدِيثٌ صَحِيحٌ قَدْ رَوَاهُ يُونُسُ عَنِ الزُّهْرِيِّ ‏.‏

sunnah.com