Sayyiduna Uthman bin Affan (may Allah be pleased with him) narrates: "I heard the Messenger of Allah (peace and blessings be upon him) say: 'The blood of a Muslim man is not lawful (to shed) except for one of three reasons: that he commits adultery after being married, or kills a person and is therefore killed (in retaliation), or disbelieves after his Islam (becomes an apostate) and is therefore killed.'"
Imam al-Nasa'i (may Allah have mercy on him) narrated it in this way.