This excerpt is taken from Sheikh Abi Abdul Saboor Abdul Ghafoor Damni's book Fazail al-Jihad.
If someone sincerely desires martyrdom from Allah Almighty, he attains the rank of martyr even if he dies on his deathbed
حدثني أبو شريح أن سهل بن أبى أمامة بن سهل بن حنيف حدثه عن أبيه عن جده أن النبى صلى الله عليه وسلم قال من سأل الله الشهادة بصدق بلغه الله منازل الشهداء وإن مات على فراشه.
"Abu Shurayh narrates that indeed Sahl bin Abi Imamah bin Sahl bin Hunayf (may Allah be pleased with him) narrated from his father, who narrated from his grandfather, that the Prophet Muhammad (peace be upon him) said: 'Whoever sincerely asks Allah for martyrdom, Allah will grant him the ranks of the martyrs, even if he dies on his bed.'"
Reference: (Sahih Muslim) (Narrated by Muslim, Book of Leadership, Chapter on the recommendation of seeking martyrdom in the way of Allah Almighty, Number: 1909)
Derived Benefits
➊ It is a great blessing of sincerity.
➋ Desiring martyrdom is a very virtuous act.
➌ Legitimacy of seeking martyrdom: From the mentioned hadith, the permissibility of desiring martyrdom is also established.