It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Our Lord is greatly pleased with two men. One is a man who rises from his bed and his blanket, leaving his beloved and his family, to his prayer; Allah Almighty says to His angels: O My angels! Look at this servant of Mine: he is (occupied in worship) out of fear of My punishment. The other is a man who fought in the path of Allah; then his companions retreated (from the battlefield), but he knew how great a sin there is in turning one's back and how great a reward in turning back to fight, so he returned until his blood was shed. Then Allah, Glorified and Exalted, says to His angels: O My angels! Look at this servant of Mine: he returned, out of desire for the reward that is with Me and fear of My seizing, until his blood was shed."
Imam Abu Bakr bin Abi Shaybah, Abu Ya'la, Ahmad bin Hanbal, al-Tabarani, and Ibn Hibban in his Sahih, recorded this hadith, while Imam Abu Dawud recorded in his Sunan only the part of it about jihad.