All the sins of a Shahid (martyr) are forgiven except debt.

Sahih Muslim Book 33 Hadith 179

Sahih Muslim #1886 a

The Book on Government 33:179

It has been reported on the authority of 'Amr b. al-'As that the Messenger of Allah (ﷺ) said:

All the sins of a Shahid (martyr) are forgiven except debt.

Chapter: If a person is killed in the cause of Allah, all his sins will be expiated except debt

Grade: Sahih