Sahih Muslim, Book 33, Hadith 224 (Muslim 4884)

It has been narrated on the authority of Anas b. Malik that the Messenger of Allah (may peace he upon him) said:

Who seeks martyrdom with sincerity shall get its reward, though he may not achieve it.