The Messenger of Allah ﷺ said, "The blood of a Muslim who testifies that there is no god but Allah and that I am the Messenger of Allah is not lawful to shed except in one of three cases, the married person who commits adultery, a life for a life, and the one who abandons his religion and separates from the community."He said, And there are also narrations on this subject from Uthman, Ayesha, and Ibn Abbas.
حدثنا هناد حدثنا أبو معاوية عن الأعمش عن عبد الله بن مرة عن مسروق
قال رسول الله ﷺ لا يحل دم امرئ مسلم يشهد أن لا إله إلا الله وأني رسول الله إلا بإحدى ثلاث الثيب الزاني والنفس بالنفس والتارك لدينه المفارق للجماعة قال وفي الباب عن عثمان وعائشة وابن عباس
Agreed upon. Muslim narrated it in the Book of Retaliation and Combatants, Chapter on What Makes a Muslim's Blood Lawful, hadith no. 1676, from the hadith of Abu Muawiya the Blind, and Bukhari narrated it, hadith no. 6878, from the hadith of Amash, in the same chapter. It is also reported from Uthman [to come: 2158], Ayesha [Abu Dawud, hadith no. 4353], and Ibn Abbas [Ibn Majah, hadith no. 2539].