Abu Musa Ashari reported,

A man came to the Prophet ﷺ and asked, "One man fights for the spoils, another fights to be remembered, and another fights to be seen for his standing. Which of them is in the path of Allah?"He replied, "Whoever fights so that the word of Allah may be the highest, he is in the path of Allah."

Azami 12471

Sahih

عن أبي موسى الأشعري قال

جاء رجل إلى النبي ﷺ فقال: الرجل يقاتل للمغنم والرجل يقاتل ليذكر، والرجل يقاتل ليرى مكانه، فمن في سبيل الله؟ قال: من قاتل لتكون كلمة الله هي العليا، فهو في سبيل الله.

الأعظمي 12471صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "Go forth, light or heavy, and strive with your wealth and your lives in the cause of Allah. That is better for you, if you only knew"
Numbering
Jami al-Kamil 12471 (2nd edition)
Azami 12471