Sunan an-Nasa'i 4195
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
الْغَزْوُ غَزْوَانِ فَأَمَّا مَنِ ابْتَغَى وَجْهَ اللَّهِ وَأَطَاعَ الإِمَامَ وَأَنْفَقَ الْكَرِيمَةَ وَاجْتَنَبَ الْفَسَادَ فَإِنَّ نَوْمَهُ وَنُبْهَتَهُ أَجْرٌ كُلُّهُ وَأَمَّا مَنْ غَزَا رِيَاءً وَسُمْعَةً وَعَصَى الإِمَامَ وَأَفْسَدَ فِي الأَرْضِ فَإِنَّهُ لاَ يَرْجِعُ بِالْكَفَافِ "
It was narrated from Muadah bin Jabal that the Messenger of Allah said:
"Military campaigns are of two types: as for the one who seeks the Face of Allah, obeys the imam, spends what is precious and avoids mischief, whether he is asleep or awake, he is earning reward. But as for the one who fights in order to show off and gain a reputation, and disobeys the imam and spreads mischief in the land, he comes back empty-handed." (Da 'if)
Full reference and source
Sunan an-Nasa'i 4195 In-book : Book 39, Hadith 47 English translation : Vol. 5, Book 39, Hadith 4200
View source on Sunnah.com (opens in a new tab)