Ubaydullah bin Adi reported,

Miqdad bin Amr bin Aswad Kindi, who was an ally of the clan of Zuhrah and one of those who fought at Badr alongside the Messenger of Allah ﷺ, said, "Messenger of Allah, tell me, what if I meet a man from among the disbelievers and he fights me, and he strikes one of my hands with his sword and cuts it off, and then he takes refuge from me behind a tree and says, 'I have submitted to Allah.' Am I to kill him, Messenger of Allah, after he has said that?"The Messenger of Allah ﷺ replied, "Do not kill him."Miqdad said, "I said, 'Messenger of Allah, but he had already cut off my hand, and he only said it after cutting it off. Am I to kill him then?'"The Messenger of Allah ﷺ said, "Do not kill him. If you kill him, he will be in your position before you killed him, and you will be in his position before he spoke the words he spoke."

Muslim 276

Sahih

و حدثني حرملة بن يحيى أخبرنا ابن وهب قال أخبرني يونس عن ابن شهاب قال حدثني عطاء بن يزيد الليثي ثم الجندعي أن عبيد الله بن عدي بن الخيار أخبره أن المقداد بن عمرو بن الأسود الكندي وكان حليفا لبني زهرة وكان ممن شهد بدرا مع رسول الله ﷺ أنه قال يا رسول الله أرأيت إن لقيت رجلا من الكفار ثم ذكر بمثل حديث الليث

مسلم 276صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Faith
Chapter
Prohibition of killing a disbeliever after he says there is no god but Allah
Numbering
Darussalam 276
Muslim 276