It is narrated from Sayyiduna Abu Qatadah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) stood up and delivered a sermon: He praised and glorified Allah, then mentioned jihad, and did not leave anything superior to jihad (i.e., he declared jihad to be the most virtuous) except for the obligatory duties. A companion stood up and said: O Messenger of Allah! Tell me, if a person is killed in the way of Allah, will his sins be forgiven? The Messenger of Allah (peace and blessings be upon him) said: "Yes, if he advances with patience and seeking reward, and is killed while advancing and not retreating (all his sins will be forgiven) except for debt. He will be held accountable for it even after being martyred, as Jibreel (peace be upon him) has just informed me."
Hadith Takhrijتخریج اس حدیث کی سند صحیح ہے۔ دیکھئے: [مسلم 1885] ، [ترمذي 1712] ، [نسائي 3156، له شاهد عند أبى يعلی 1857] ، [الحميدي 429]
Brief Explanation
(Commentary on Hadith 2448)
Imam Nawawi rahimahullah said: From this it is understood that if the intention is pure (then martyrdom is an expiation for all sins), meaning that one fights purely for the sake of Allah Ta'ala, not for land, wealth, or riches, nor for the fame or honor of the nation. However, his debt will not be forgiven, and likewise, all the rights of the servants (huquq al-‘ibad) will also not be forgiven. At first, the Prophet sallallahu alayhi wa sallam did not make an exception for debt, but then Jibril alayhis salam immediately informed the Prophet sallallahu alayhi wa sallam, so he clarified it.
(Wahidi).
Martyrdom should be the desired and intended goal of the believer, Not spoils of war, nor conquest of lands.