Ayesha reported,

The Messenger of Allah ﷺ said, "The blood of a Muslim who testifies that there is no god but Allah and that Muhammad is the Messenger of Allah is not lawful to shed except in one of three cases: a man who commits adultery after marriage, who is to be stoned, a man who goes out to wage war against Allah and His Messenger, who is to be killed, crucified, or banished from the land, or one who kills another person and is killed in retaliation."In another narration, "A man who leaves Islam and wages war against Allah and His Messenger, and is killed."

Azami 7030

Sahih

عن عائشة قالت

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

الأعظمي 7030صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Apostate, those who wage war, and whoever insults the Messenger
Section
Ruling on the male apostate and female apostate and seeking their repentance
Numbering
Jami al-Kamil 7030 (2nd edition)
Azami 7030