Quran 5, 32 Because of that, We decreed upon the Children of Israel that whoever kills a soul unless for a soul or for corruption in the land – it is as if he had slain mankind entirely. And whoever saves one – it is as if he had saved mankind entirely. And Our messengers had certainly come to them with clear proofs. Then indeed many of them, after that, throughout the land, were transgressors.
مِن أَجلِ ذٰلِكَ كَتَبنا عَلىٰ بَني إِسرائيلَ أَنَّهُ مَن قَتَلَ نَفسًا بِغَيرِ نَفسٍ أَو فَسادٍ فِي الأَرضِ فَكَأَنَّما قَتَلَ النّاسَ جَميعًا وَمَن أَحياها فَكَأَنَّما أَحيَا النّاسَ جَميعًا ۚ وَلَقَد جاءَتهُم رُسُلُنا بِالبَيِّناتِ ثُمَّ إِنَّ كَثيرًا مِنهُم بَعدَ ذٰلِكَ فِي الأَرضِ لَمُسرِفونَ
Commentary
For the Quran, murder is never justified, no matter what attack you receive and if you are in reason, this is what the Holy Word in the Quran says, but many prefer to interpret it differently.
Because of what Cain, GOD has decreed for the children of Israel (the believers; the People of GOD) that whoever kills a Soul will be as if he has killed all of mankind; and whoever saves the life of one, even refraining from killing him, will be as if he has saved the life of all mankind.
So since Cain unjustly killed Abel in the Torah, after this event it has been established that Hell will be the place for those who have premeditatedly, unjustly killed a human being, as if he had killed all mankind. But even the one who has great compassion and forbearance because he is aware that everything comes from GOD, the one who saves the life of one, and who refrains from killing a person, will be as if he has saved the life of all mankind. Heaven will be his abode for sparing one Soul, as if he had spared the life of all mankind.
GOD’s messengers have already come to them, i.e. the children of Israel, with clear proofs and miracles, but many of them continue to commit excesses on earth by overstepping their bounds through unbelief, killing and the like.