A man from Banu Nabit, a tribe of the Ansar, came forward and said, "I bear witness that there is no god but Allah and that you are His servant and messenger." Then he advanced and fought until he was killed.The Prophet ﷺ said, "He did little, yet he was rewarded much."In another wording, a man clad in iron armor came to the Prophet ﷺ and asked, "Messenger of Allah, shall I fight or accept Islam?"He replied, "Accept Islam, then fight."So he embraced Islam, then fought, and was killed.The Messenger of Allah ﷺ said, "He did little, yet he was rewarded much."
جاء رجل من بني النبيت- قبيلة من الأنصار- فقال: أشهد أن لا إلا الله وأنك عبده ورسوله، ثم تقدم فقاتل حتى قتل، فقال النبي ﷺ: عمل هذا يسيرا، وأجر كثيرا. وفي لفظ: أتى النبي ﷺ رجل مقنع بالحديد فقال: يا رسول الله أقاتل أو أسلم؟ قال: أسلم ثم قاتل، فأسلم ثم قاتل فقتل، فقال رسول الله ﷺ: عمل قليلا وأجر كثيرا.
Bukhari related it in jihad (2808), and Muslim in leadership (144:1900), both of them through routes from Abu Ishaq, from Bara, who said, and he mentioned it. The first wording is Muslim's, and the second wording is Bukhari's.