Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:12710Abū al-Ḥusayn ʿAlī b. Muḥammad b. ʿAbdullāh b. Bishrān al-ʿAdl> Abū ʿAlī Ismāʿīl b. Muḥammad al-Ṣaffār Sanah Sabʿ And Thalāthīn Wathalāthimiāʾah > Muḥammad b. ʿUbaydullāh al-Munādī > Wahb b. Jarīr > Shuʿbah > Simāk > Muṣʿab b. Saʿd > Saʿd

[Machine] There were four verses revealed to me; I struck a sword on the day of Badr, so I said, "O Messenger of Allah, allow me to benefit from it." He said, "Put it wherever you took it from." Then I said, "O Messenger of Allah, allow me to benefit from it." He said, "Put it wherever you took it from." Then I said, "O Messenger of Allah, allow me to benefit from it and make me like someone who has no wealth." He said, "Put it wherever you took it from." And the verse was revealed, "They ask you about the spoils of war. Say, 'The spoils of war belong to Allah and the Messenger'" [Surah Anfal: 1] until the end of the verse.  

البيهقي:١٢٧١٠أَخْبَرَنَا أَبُو الْحُسَيْنِ عَلِيُّ بْنُ مُحَمَّدِ بْنِ عَبْدِ اللهِ بْنِ بِشْرَانَ الْعَدْلُ بِبَغْدَادَ أنا أَبُو عَلِيٍّ إِسْمَاعِيلُ بْنُ مُحَمَّدٍ الصَّفَّارُ سَنَةَ سَبْعٍ وَثَلَاثِينَ وَثَلَاثِمِائَةٍ ثنا مُحَمَّدُ بْنُ عُبَيْدِ اللهِ الْمُنَادِي ثنا وَهْبُ بْنُ جَرِيرٍ ثنا شُعْبَةُ عَنْ سِمَاكٍ عَنْ مُصْعَبِ بْنِ سَعْدٍ عَنْ سَعْدٍ قَالَ

نَزَلَتْ فِيَّ أَرْبَعُ آيَاتٍ؛ أَصَبْتُ سَيْفًا يَوْمَ بَدْرٍ فَقُلْتُ يَا رَسُولَ اللهِ نَفِّلْنِيهِ فَقَالَ ضَعْهُ مِنْ حَيْثُ أَخَذْتَهُ ثُمَّ قُلْتُ يَا رَسُولَ اللهِ نَفِّلْنِيهِ فَقَالَ ضَعْهُ مِنْ حَيْثُ أَخَذْتَهُ فَقُلْتُ يَا رَسُولَ اللهِ نَفِّلْنِيهِ وَاجْعَلْنِي كَمَنْ لَا غَنَاءَ لَهُ قَالَ ضَعْهُ مِنْ حَيْثُ أَخَذْتَهُ وَنَزَلَتْ {يَسْأَلُونَكَ عَنِ الْأَنْفَالِ قُلِ الْأَنْفَالُ لِلَّهِ وَالرَّسُولِ} [الأنفال 1] إِلَى آخِرِ الْآيَةِ  

أَخْرَجَهُ مُسْلِمٌ مِنْ حَدِيثِ غُنْدَرٍ عَنْ شُعْبَةَ وَقَالَ اجْعَلْنِي كَمَنْ لَا غَنَاءَ لَهُ

See similar narrations below:

Collected by Muslim
muslim:1748bMuḥammad b. al-Muthanná And Ibn Bashhār And al-Lafẓ Ibn al-Muthanná > Muḥammad b. Jaʿfar > Shuʿbah > Simāk b. Ḥarb > Muṣʿab b. Saʿd from his father

" Four verses of the Qur'an have been revealed about me. I found a sword (among the spoils of war). It was brought to the Prophet ﷺ. He (my father) said: Messenger of Allah, bestow it upon me. The Apostle of Allah ﷺ said: Place it there. Then he (my father) stood up and the Messenger of Allah ﷺ said to him: Place it from where you got it. (At this) he (my father) said again: Messenger of Allah, bestow it upon me Shall I be treated like one who has no share in (the booty)? The Apostle of Allah (may peace be upon him said: Place it from where you got it. At this was revealed the verse:" They ask thee about the spoils of war.... Say: The spoils of war are for Allah and the Messenger"  

مسلم:١٧٤٨bحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى وَابْنُ بَشَّارٍ وَاللَّفْظُ لاِبْنِ الْمُثَنَّى قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ حَدَّثَنَا شُعْبَةُ عَنْ سِمَاكِ بْنِ حَرْبٍ عَنْ مُصْعَبِ بْنِ سَعْدٍ عَنْ أَبِيهِ قَالَ

نَزَلَتْ فِيَّ أَرْبَعُ آيَاتٍ أَصَبْتُ سَيْفًا فَأَتَى بِهِ النَّبِيَّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ نَفِّلْنِيهِ فَقَالَ ضَعْهُ ثُمَّ قَامَ فَقَالَ لَهُ النَّبِيُّ ﷺ ضَعْهُ مِنْ حَيْثُ أَخَذْتَهُ ثُمَّ قَامَ فَقَالَ نَفِّلْنِيهِ يَا رَسُولَ اللَّهِ فَقَالَ ضَعْهُ فَقَامَ فَقَالَ يَا رَسُولَ اللَّهِ نَفِّلْنِيهِ أَأُجْعَلُ كَمَنْ لاَ غَنَاءَ لَهُ فَقَالَ لَهُ النَّبِيُّ ﷺ ضَعْهُ مِنْ حَيْثُ أَخَذْتَهَ قَالَ فَنَزَلَتْ هَذِهِ الآيَةُ { يَسْأَلُونَكَ عَنِ الأَنْفَالِ قُلِ الأَنْفَالُ لِلَّهِ وَالرَّسُولِ}