‘Abd Allaah (bin Masud) said “I asked Apostle of Allaah ﷺ which sin is the gravest?” He replied “That you associate someone with Allaah, while He has created you”. I again asked “Which then?” He replied “That you commit adultery with the wife of your neighbor.” Allaah then revealed the following Qur’anic verse in support of the statement of the Prophet ﷺ “Those who invoke not with Allaah any other god nor slay such life as Allaah has made sacred except for just cause nor commit fornication.”
قُلْتُ يَا رَسُولَ اللَّهِ أَىُّ الذَّنْبِ أَعْظَمُ قَالَ أَنْ تَجْعَلَ لِلَّهِ نِدًّا وَهُوَ خَلَقَكَ قَالَ فَقُلْتُ ثُمَّ أَىٌّ قَالَ أَنْ تَقْتُلَ وَلَدَكَ مَخَافَةَ أَنْ يَأْكُلَ مَعَكَ قَالَ قُلْتُ ثُمَّ أَىٌّ قَالَ أَنْ تُزَانِيَ حَلِيلَةَ جَارِكَ قَالَ وَأَنْزَلَ اللَّهُ تَعَالَى تَصْدِيقَ قَوْلِ النَّبِيِّ ﷺ { وَالَّذِينَ لاَ يَدْعُونَ مَعَ اللَّهِ إِلَهًا آخَرَ وَلاَ يَقْتُلُونَ النَّفْسَ الَّتِي حَرَّمَ اللَّهُ إِلاَّ بِالْحَقِّ وَلاَ يَزْنُونَ } الآيَةَ