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."
حدث أن رسول الله ﷺ بينا هو جالس بين ظهراني الناس جاءه رجل يستأذنه- أو يشاوره- يساره في قتل رجل من المنافقين يستأذن فيه. فجهر رسول الله ﷺ بكلامه فقال: أليس يشهد أن لا إله إلا الله؟ قال: بلى، ولكن لا شهادة له، قال: أليس يشهد أني رسول الله؟ قال: بلى، ولا شهادة له، قال: أليس يصلي؟ قال: بلى، ولا صلاة له، قال: أولئك الذين نهيت عنهم.
Imam Ahmad (23671), Bayhaqi (8/196), and Ibn Hibban (5971), who graded it sahih, all reported it from the hadith of Abdul-Razzaq (18688), from Mamar, from Zuhri, from Ata bin Yazid, from Ubaydullah bin Adi bin Khiyar, from Abdullah bin Adi, who narrated it. Its isnad is sahih.Ibn Abdul-Barr mentioned that the man accused of hypocrisy was Malik bin Dukhshum.