This verse was revealed in Mecca:" And they who call not upon another god with Allah and slay not the soul which Allah has forbidden except in the cause of justice" up to the word Muhdana (abased). Thereupon the polytheists said: Islam is of no avail to us for we have made peer with Allah and we killed the soul which Allah had forbidden to do and we committed debauchery, and it was (on this occasion) that Allah, the Exalted and Glorious, revealed this verse:" Except him who repents and believes and does good deeds" up to the end Ibn 'Abbis says: He who enters the fold of Islam and understands its command and then kills the soul there is no repentance for him.
عَبَّاسٍقَالَ نَزَلَتْ هَذِهِ الآيَةُ بِمَكَّةَ { وَالَّذِينَ لاَ يَدْعُونَ مَعَ اللَّهِ إِلَهًا آخَرَ} إِلَى قَوْلِهِ { مُهَانًا} فَقَالَ الْمُشْرِكُونَ وَمَا يُغْنِي عَنَّا الإِسْلاَمُ وَقَدْ عَدَلْنَا بِاللَّهِ وَقَدْ قَتَلْنَا النَّفْسَ الَّتِي حَرَّمَ اللَّهُ وَأَتَيْنَا الْفَوَاحِشَ فَأَنْزَلَ اللَّهُ ﷻ { إِلاَّ مَنْ تَابَ وَآمَنَ وَعَمِلَ عَمَلاً صَالِحًا} إِلَى آخِرِ الآيَةِ قَالَ فَأَمَّا مَنْ دَخَلَ فِي الإِسْلاَمِ وَعَقَلَهُ ثُمَّ قَتَلَ فَلاَ تَوْبَةَ لَهُ