Abdullah bin Masud reported,

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 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."

Azami 12652

Sahih

عن عبد الله قال

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

الأعظمي 12652صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "And do not kill the soul which Allah has forbidden except by right. This He has instructed you that you may use reason."
Numbering
Jami al-Kamil 12652 (2nd edition)
Azami 12652