Ayesha reported,

The Messenger of Allah ﷺ said, "It is not lawful to kill a Muslim except in one of three cases. A married person who commits adultery, who is to be stoned. A man who deliberately kills a Muslim. And a man who leaves Islam and wages war against Allah عز وجل and His Messenger, who is to be killed, crucified, or banished from the land."

Nasai 4747

Sahih

أخبرنا أحمد بن حفص بن عبد الله قال حدثني أبي قال حدثني إبراهيم عن عبد العزيز بن رفيع عن عبيد بن عمير

عن عائشة أم المؤمنين

عن رسول الله ﷺ أنه قال لا يحل قتل مسلم إلا في إحدى ثلاث خصال زان محصن فيرجم ورجل يقتل مسلما متعمدا ورجل يخرج من الإسلام فيحارب الله عز وجل ورسوله فيقتل أو يصلب أو ينفى من الأرض

النسائي 4747صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Sworn testimony
Chapter
Dropping of retaliation from a Muslim for a disbeliever
Numbering
Darussalam 4747
Nasai 4747