The Prophet ﷺ said, "Whoever kills a person under a covenant who has the protection of Allah and the protection of His Messenger has violated the covenant of Allah. He shall not catch the scent of Paradise, though its fragrance can be found from a distance of seventy autumns' journey."
حدثنا محمد بن بشار حدثنا معدي بن سليمان هو البصري عن ابن عجلان عن أبيه
عن النبي ﷺ قال ألا من قتل نفسا معاهدا له ذمة الله وذمة رسوله فقد أخفر بذمة الله فلا يرح رائحة الجنة وإن ريحها ليوجد من مسيرة سبعين خريفا
[Sahih]. Ibn Majah also narrated it in the Book of Blood Money, in the chapter on one who kills a person under a covenant of protection, hadith no. 2687, from Muhammad bin Bashar, with the same wording, but its chain is daif. The hadith has corroborating narrations in Bukhari, hadith nos. 3166 and 6914, and elsewhere.There is also a narration on this topic from Abu Bakra [Abu Dawud, hadith no. 2760].