The Prophet ﷺ said, "Whoever dies without having fought in battle and without having even resolved within himself to fight, dies on a branch of hypocrisy."
حدثنا إبراهيم حدثنا ابن مبارك عن وهيب أخبرني عمر بن محمد بن المنكدر عن سمي عن أبي صالح
عن النبي ﷺ قال من مات ولم يغز ولم يحدث نفسه بغزو مات على شعبة نفاق
Its isnad is sahih. It is found in Muslim 3/1517, no. 1910, in the book of Leadership, chapter on the condemnation of one who dies without having fought, and in Abu Dawud 3/10, no. 2501, in the book of jihad, chapter on the disapproval of abandoning warfare, from Abu Hurairah, and likewise in Nasai 6/8, no. 3097, in the book of jihad, chapter on the severity concerning the abandonment of jihad.