It has been narrated on the authority of Anas bin Malik (RA) that the Messenger of Allah (ﷺ) said: Who seeks martyrdom with sincerity shall get its reward, though he may not achieve it.
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: To desire and long for martyrdom (shahadah) is not for the purpose that the disbeliever should gain dominance over the Muslim; rather, its purpose is that there is a need to offer one's life as a sacrifice for jihad, because without this, it is not possible to achieve victory over the enemy and to subject him to defeat. Therefore, a believer harbors deep within his heart this passion: that for the exaltation of the word of Allah and the elevation of Islam, and for Muslims to gain dominance and victory over the disbelievers, I should offer my life as a sacrifice, so that as a result of my selflessness and sacrifice, the Muslims may attain the desired outcomes.
In any case, the objective is that life, in any event, is destined to end, and it will end at its appointed time. Thus, it is my good fortune that my life is spent in the path of Allah. May Allah, the Exalted, instill this passion in all Muslims so that they may gain dominance and superiority over the disbelievers, because no cowardly or faint-hearted nation can ever attain success.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 4929