حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ شَقِيقٍ، عَنْ أَبِي مُوسَى، قَالَ سُئِلَ النَّبِيُّ صلى الله عليه وسلم عَنِ الرَّجُلِ يُقَاتِلُ شَجَاعَةً وَيُقَاتِلُ حَمِيَّةً وَيُقَاتِلُ رِيَاءً فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مَنْ قَاتَلَ لِتَكُونَ كَلِمَةُ اللَّهِ هِيَ الْعُلْيَا فَهُوَ فِي سَبِيلِ اللَّهِ ‏"‏ ‏.‏

It wasnarrated that Abu Musa said: “The Prophet (PBUH) was askedabout aman who fights to prove his courage, or out of pride andhonour forhis close relatives, or to show off. The Messenger of Allah(PBUH)said: ‘Whoever fights so that the Word of Allah may be supremeisthe one who (is fighting) in the cause of Allah.’” Translation Not Available

Book Ref: Sunan Ibn Majah Book 24 Hadith 2783
Web Ref:  Sunan Ibn Majah Vol 4 Book 24 Hadith 2783