Sunan Abi Dawud, Hadith 2530

Narrated Abdullah ibn Mas'ud: The Prophet said: Our Lord Most High is pleased with a man who fights in the path of Allah, the Exalted; then his companions fled away (i.e. retreated). But he knew that it was a sin (to flee away from the battlefield), so he returned, and his blood was shed. Thereupon Allah, the Exalted, says to His angels: Look at My servant; he returned seeking what I have for him (i.e. the reward), and fearing (the punishment) I have, until his blood was shed.

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

sunnah.com