It is narrated on the authority of Miqdad bin Aswad that he said. Messenger of Allah, you just see (here is a point): If I encountered a person amongst the infidels (in the battlefield) and he attacked me and struck me and cut off one of my hands with the sword. Then he (in order to protect himself from me) took shelter of a tree and said: I become Muslim for Allah's sake. Messenger of Allah, can I kill him after he had uttered this? The Messenger of Allah (ﷺ) said: Do not kill him. I (the narrator) said: Messenger of Allah, he cut off my hand and uttered this after amputating it; should I then kill him? The Messenger of Allah (ﷺ) said: Don't kill him, for I you kill him, verily he would be in a position where you had been before killing him and verily you would be in a position where he had been before uttering (kalima).
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Vocabulary of the Hadith: Ladha: To seek refuge, To take protection.
Benefits and Issues: When a disbeliever utters the testimony of Islam (the kalimah) with his tongue, his life becomes inviolable and protected, and it is not permissible to kill him. If any Muslim kills him, then the sanctity and protection of that Muslim’s life will be lost, and it will be permissible to kill him in retribution (qisas).
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 274