Abdullah bin Adi reported,

It is reported that while the Messenger of Allah ﷺ was sitting among the people, a man came to him seeking permission, or consulting him privately, asking permission to kill a man from among the hypocrites.The Messenger of Allah ﷺ spoke aloud and asked, "Does he not testify that there is no god but Allah?"The man replied, "Yes, but his testimony counts for nothing."The Prophet ﷺ asked, "Does he not testify that I am the Messenger of Allah?"He answered, "Yes, but his testimony counts for nothing."The Prophet ﷺ asked, "Does he not pray?"He replied, "Yes, but his prayer counts for nothing."The Prophet ﷺ said, "Those are the ones I have been forbidden to kill."

Azami 6785

Sahih

عن عبد الله بن عدي الأنصاري

حدث أن رسول الله ﷺ بينا هو جالس بين ظهراني الناس جاءه رجل يستأذنه- أو يشاوره- يساره في قتل رجل من المنافقين يستأذن فيه. فجهر رسول الله ﷺ بكلامه فقال: أليس يشهد أن لا إله إلا الله؟ قال: بلى، ولكن لا شهادة له، قال: أليس يشهد أني رسول الله؟ قال: بلى، ولا شهادة له، قال: أليس يصلي؟ قال: بلى، ولا صلاة له، قال: أولئك الذين نهيت عنهم.

الأعظمي 6785صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Retaliation and crimes
Chapter
Prohibition of protected blood
Section
Blood of a Muslim is not lawful except in three cases
Numbering
Jami al-Kamil 6785 (2nd edition)
Azami 6785