Sahih al-Bukhari, Hadith 123 ⓘ
Narrated Abu Musa: A man came to the Prophet and asked, "O Allah's Messenger! What kind of fighting is in Allah's cause? (I ask this), for some of us fight because of being enraged and angry and some for the sake of his pride and haughtiness." The Prophet raised his head (as the questioner was standing) and said, "He who fights so that Allah's Word (Islam) should be superior, then he fights in Allah's cause."
حَدَّثَنَا عُثْمَانُ، قَالَ أَخْبَرَنَا جَرِيرٌ، عَنْ مَنْصُورٍ، عَنْ أَبِي وَائِلٍ، عَنْ أَبِي مُوسَى، قَالَ جَاءَ رَجُلٌ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ، مَا الْقِتَالُ فِي سَبِيلِ اللَّهِ فَإِنَّ أَحَدَنَا يُقَاتِلُ غَضَبًا، وَيُقَاتِلُ حَمِيَّةً. فَرَفَعَ إِلَيْهِ رَأْسَهُ ـ قَالَ وَمَا رَفَعَ إِلَيْهِ رَأْسَهُ إِلاَّ أَنَّهُ كَانَ قَائِمًا ـ فَقَالَ " مَنْ قَاتَلَ لِتَكُونَ كَلِمَةُ اللَّهِ هِيَ الْعُلْيَا فَهُوَ فِي سَبِيلِ اللَّهِ عَزَّ وَجَلَّ " .
also referenced under: Book 3, Hadith 65 (In-Book) & Volume 1, Book 3, Hadith 125 (USC-MSA)