Ameer al-Mu'mineen Sayyiduna Uthman bin Affan (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "It is not permissible to shed the blood of a Muslim except for one of three reasons: one, for disbelief after faith (that is, after becoming a Muslim, he becomes a disbeliever again); or if he commits adultery after marriage (he will be stoned); or a person who unjustly kills someone, he will be killed in retribution."
Hadith Referenceسنن دارمي / من كتاب الاحدود / 2334
Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings of Allah be upon him) said: "The blood of any man who testifies that there is no god but Allah and that I am the Messenger of Allah is not lawful, except in three cases (even if he is a Muslim): a life for a life, a married adulterer, and one who leaves his religion and separates from the community of Muslims."
Hadith Referenceسنن دارمي / من كتاب الاحدود / 2335
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 2344]