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.
nasai-kubra:4333ʿĪsá b. Hilāl > Muḥammad b. Ḥimyar > Muʿāwiyah b. Salām > ʿIkrimah b. ʿAmmār > Shaddād Abū ʿAmmār > Abū Umāmah al-Bāhilī

"A man came to the Prophet ﷺ and said: 'What do you think of a man who fights seeking reward and fame - what will he have?' The Messenger of Allah ﷺ said: 'He will not have anything.' He repeated it three times, and the Prophet ﷺ said to him: 'He will not have anything.' Then he said: 'Allah does not accept any deed, except that which is purely for Him, and seeking His Face.'" (Using translation from Nasāʾī 3140)  

الكبرى للنسائي:٤٣٣٣أَخْبَرَنَا عِيسَى بْنُ هِلَالٍ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ حِمْيَرٍ قَالَ حَدَّثَنَا مُعَاوِيَةُ بْنُ سَلَامٍ عَنْ عِكْرِمَةَ بْنِ عَمَّارٍ عَنْ شَدَّادِ أَبِي عَمَّارٍ عَنْ أَبِي أُمَامَةَ الْبَاهِلِيِّ قَالَ

جَاءَ رَجُلٌ إِلَى النَّبِيِّ ﷺ فَقَالَ أَرَأَيْتَ رَجُلًا غَزَا يَلْتَمِسُ الْأَجْرَ وَالذِّكْرَ مَا لَهُ؟ فَقَالَ رَسُولُ اللهِ ﷺ «لَا شَيْءَ لَهُ» فَأَعَادَهَا ثَلَاثَ مَرَّاتٍ يَقُولُ لَهُ رَسُولُ اللهِ ﷺ «لَا شَيْءَ لَهُ» ثُمَّ قَالَ «إِنَّ اللهَ لَا يَقْبَلُ مِنَ الْعَمَلِ إِلَّا مَا كَانَ لَهُ خَالِصًا وَابْتُغِيَ بِهِ وَجْهُهُ»  


See similar narrations below:

Collected by Nasāʾī
nasai:3140ʿĪsá b. Hilāl al-Ḥimṣī > Muḥammad b. Ḥimyar > Muʿāwiyah b. Salāam > ʿIkrimah b. ʿAmmār > Shaddād Abū ʿAmmār > Abū Umāmah al-Bāhilī

"A man came to the Prophet ﷺ and said: 'What do you think of a man who fights seeking reward and fame - what will he have?' The Messenger of Allah ﷺ said: 'He will not have anything.' He repeated it three times, and the Prophet ﷺ said to him: 'He will not have anything.' Then he said: 'Allah does not accept any deed, except that which is purely for Him, and seeking His Face.'"  

النسائي:٣١٤٠أَخْبَرَنَا عِيسَى بْنُ هِلاَلٍ الْحِمْصِيُّ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ حِمْيَرٍ قَالَ حَدَّثَنَا مُعَاوِيَةُ بْنُ سَلاَّمٍ عَنْ عِكْرِمَةَ بْنِ عَمَّارٍ عَنْ شَدَّادٍ أَبِي عَمَّارٍ عَنْ أَبِي أُمَامَةَ الْبَاهِلِيِّ قَالَ

جَاءَ رَجُلٌ إِلَى النَّبِيِّ ﷺ فَقَالَ أَرَأَيْتَ رَجُلاً غَزَا يَلْتَمِسُ الأَجْرَ وَالذِّكْرَ مَا لَهُ فَقَالَ رَسُولُ اللَّهِ ﷺ لاَ شَىْءَ لَهُ فَأَعَادَهَا ثَلاَثَ مَرَّاتٍ يَقُولُ لَهُ رَسُولُ اللَّهِ ﷺ لاَ شَىْءَ لَهُ ثُمَّ قَالَ إِنَّ اللَّهَ لاَ يَقْبَلُ مِنَ الْعَمَلِ إِلاَّ مَا كَانَ لَهُ خَالِصًا وَابْتُغِيَ بِهِ وَجْهُهُ