Sunan an-Nasa'i, Book 25, Hadith 71 (In-Book)

It was narrated that Abu Hurairah said: "A man came to the Prophet while he was delivering a Khutbah from the Minbar, and he said: 'If I fight in the cause of Allah with patience and seeking reward, facing the enemy and not running away, do you think that Allah will forgive my sins?' He said: 'Yes.' Then he fell silent for a while. Then he said: 'Where is the one who was asking just now?' The man said: 'Here I am.' He said: 'What did you say?' He said: 'What did you say?' He said: 'I said: I said: If I fight in the cause of Allah with patience and seeking reward,facing the enemy and not running away, do you think that Allah will forgive my sins?' He said: 'Yes, except for debt. Jibril told me that just now.'"

أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ، قَالَ حَدَّثَنَا أَبُو عَاصِمٍ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ عَجْلاَنَ، عَنْ سَعِيدٍ الْمَقْبُرِيِّ، عَنْ أَبِي هُرَيْرَةَ، قَالَ جَاءَ رَجُلٌ إِلَى النَّبِيِّ صلى الله عليه وسلم وَهُوَ يَخْطُبُ عَلَى الْمِنْبَرِ فَقَالَ أَرَأَيْتَ إِنْ قَاتَلْتُ فِي سَبِيلِ اللَّهِ صَابِرًا مُحْتَسِبًا مُقْبِلاً غَيْرَ مُدْبِرٍ أَيُكَفِّرُ اللَّهُ عَنِّي سَيِّئَاتِي قَالَ ‏"‏ نَعَمْ ‏"‏ ‏.‏ ثُمَّ سَكَتَ سَاعَةً قَالَ ‏"‏ أَيْنَ السَّائِلُ آنِفًا ‏"‏ ‏.‏ فَقَالَ الرَّجُلُ هَا أَنَا ذَا ‏.‏ قَالَ ‏"‏ مَا قُلْتَ ‏"‏ ‏.‏ قَالَ أَرَأَيْتَ إِنْ قُتِلْتُ فِي سَبِيلِ اللَّهِ صَابِرًا مُحْتَسِبًا مُقْبِلاً غَيْرَ مُدْبِرٍ أَيُكَفِّرُ اللَّهُ عَنِّي سَيِّئَاتِي قَالَ ‏"‏ نَعَمْ إِلاَّ الدَّيْنَ سَارَّنِي بِهِ جِبْرِيلُ آنِفًا ‏"‏ ‏.‏

sunnah.com