The Messenger of Allah ﷺ Said: The blood of a Muslim man who testifies that there is no god but Allah and that Muhammad is Allah's Apostle should not lawfully be shed except only for one of three reasons: a man who committed fornication after marriage, in which case he should be stoned; one who goes forth to fight with Allah and His Apostle, in which case he should be killed or crucified or exiled from the land; or one who commits murder for which he is killed.
قَالَ رَسُولُ اللَّهِ ﷺ لاَ يَحِلُّ دَمُ امْرِئٍ مُسْلِمٍ يَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ إِلاَّ بِإِحْدَى ثَلاَثٍ رَجُلٌ زَنَى بَعْدَ إِحْصَانٍ فَإِنَّهُ يُرْجَمُ وَرَجُلٌ خَرَجَ مُحَارِبًا لِلَّهِ وَرَسُولِهِ فَإِنَّهُ يُقْتَلُ أَوْ يُصْلَبُ أَوْ يُنْفَى مِنَ الأَرْضِ أَوْ يَقْتُلُ نَفْسًا فَيُقْتَلُ بِهَا