The Chapters on Jihad 24:2889
It wasnarrated that Abu Musa said:
“The Prophet (ﷺ) 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(ﷺ)said: ‘Whoever fights so that the Word of Allah may be supremeisthe one who (is fighting) in the cause of Allah.’”