Sayyiduna Abu Malik al-Ash'ari (may Allah be pleased with him) says: I heard the Messenger of Allah (peace and blessings be upon him) say: "Indeed Allah, the Mighty and Majestic, says: Whoever resolves to go out in My path to fight, seeking My pleasure, affirming My promise and believing in My messengers, he is under the guarantee of Allah, the Mighty and Majestic: either He will cause him to die in the army by whatever death He wills and admit him to Paradise, or he will travel on under the protection of Allah, the Mighty and Majestic, however long his absence may be, until He returns him to his family with whatever reward and spoils he has gained." And he said: "Whoever sets out in the path of Allah and then dies or is killed, or is thrown by his horse or camel, or is stung by a venomous creature, or dies on his bed by whatever death Allah wills, he is a martyr."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3405