حَدَّثَنَا سَعِيدٌ قَالَ: نا عَبْدُ الرَّحْمَنِ بْنُ زِيَادٍ، عَنْ شُعْبَةَ، عَنْ عَمْرِو بْنِ مُرَّةَ، عَنْ أَبِي وَائِلٍ، عَنْ أَبِي مُوسَى الْأَشْعَرِيِّ، أَنَّ أَعْرَابِيًّا، أَتَى رَسُولَ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، فَقَالَ: يَا رَسُولَ اللَّهِ الرَّجُلُ يُقَاتِلُ لِيُصِيبَ الْمَغْنَمَ، وَالرَّجُلُ يُقَاتِلُ لِيُذْكَرَ، وَيُقَاتِلُ لِيُرَى مَكَانُهُ , فَمَنْ فِي سَبِيلِ اللَّهِ؟ فَقَالَ لَهُ رَسُولُ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «مَنْ قَاتَلَ لِتَكُونَ كَلِمَةُ اللَّهِ هِيَ الْعُلْيَا فَهُوَ فِي سَبِيلِ اللَّهِ عَزَّ وَجَلَّ»
It is narrated from Sayyiduna Abu Musa Ash'ari (may Allah be pleased with him) that a Bedouin asked the Messenger of Allah (peace and blessings be upon him): A person fights for war booty, another for fame, and another to show his bravery. Among them, who is the one fighting in the way of Allah? The Prophet (peace and blessings be upon him) said: "The one who fights so that the word of Allah is exalted, he is the one fighting in the way of Allah."
Brief Explanation
This hadith is authentic. (The text is in accordance with the narration of Bukhari and Muslim, therefore there is no doubt regarding its authenticity.)