I heard the Messenger of Allah ﷺ say, "The blood of a Muslim is not lawful except in three cases: a person who commits adultery after having been married, who is then stoned to death; one who kills another person and is killed in retaliation; or one who renounces Islam after having embraced it and is then put to death."
أخبرنا مؤمل بن إهاب قال حدثنا عبد الرزاق قال أخبرني ابن جريج عن أبي النضر عن بسر بن سعيد
سمعت رسول الله ﷺ يقول لا يحل دم امرئ مسلم إلا بثلاث أن يزني بعد ما أحصن أو يقتل إنسانا فيقتل أو يكفر بعد إسلامه فيقتل
No references are available.
[Sahih] It is in Kubra, hadith no. 3521, and Musannaf Abdul-Razzaq, 167/10, hadith no. 18702, and the hadith has many corroborating narrations.Abu Nadr is Salim, the student of Abdul-Malik bin Abdul-Aziz bin Jurayj.