Sayyiduna Ubadah bin Qurs (may Allah be pleased with him) relates: A man from among the Muslims attacked a man from among the disbelievers and struck him with a spear. The other man turned towards him and said: "I am a Muslim," but the first man killed him. This was mentioned to the Prophet (peace and blessings be upon him), and the Prophet (peace and blessings be upon him) said: "Did you kill him after he said: 'I am a Muslim'?" I said: "O Messenger of Allah! I had (already) struck him with the spear." The Prophet (peace and blessings be upon him) turned away from me and said: "He has refused, He has refused me, regarding one who kills a Muslim."
Al-Tabarani recorded it; its chain contains Adi bin al-Fadl al-Taymi, who is matruk (abandoned).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الفتن - أعاذنا الله منها / 12287