Mishkat al-Masabih 3544
A’isha reported God’s Messenger as saying, “The blood of a Muslim man who testifies that there is no god but God and that Muhammad is God’s Messenger may lawfully be shed only for one of three reasons:
fornication after marriage, in which case he should be stoned; one who goes forth to fight with God and His Messenger,* in which case he should be killed, or crucified, or made a fugitive; or one which commits murder for which he is killed.” 

Abu Dawud transmitted it.

* Mirqat iv. 53 refers this to such things as highway robbery.
وَعَنْ عَائِشَةَ قَالَتْ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَا يَحِلُّ دَمُ امْرِئٍ مُسْلِمٍ يَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ إِلَّا بِإِحْدَى ثَلَاثٍ زِنا بعدَ إِحْصانٍ فإِنَّهُ يُرجَمُ ورجلٌ خرَجَ مُحارِباً للَّهِ وَرَسُولِهِ فَإِنَّهُ يُقْتَلُ أَوْ يُصْلَبُ أَوْ يُنْفَى مِنَ الْأَرْضِ أَوْ يَقْتُلُ نَفْسًا فَيُقْتَلُ بِهَا» . رَوَاهُ أَبُو دَاوُد