‘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.” (Using translation from Abū Dāʾūd 2310)
سُئِلَ رَسُولُ اللهِ ﷺ أَيُّ الذَّنْبِ أَكْبَرُ؟ قَالَ أَنْ تَجْعَلَ لِلَّهِ نِدًّا وَهُوَ خَلَقَكَ قَالَ ثُمَّ أَيٌّ؟ قَالَ أَنْ تَقْتُلَ وَلَدَكَأَنْ يَطْعَمَ مَعَكَ قَالَ ثُمَّ أَيٌّ؟ قَالَ أَنْ تُزَانِيَ حَلِيلَةَ جَارِكَ قَالَ قَالَ عَبْدُ اللهِ فَأَنْزَلَ اللهُ تَصْدِيقَ ذَلِكَ {وَالَّذِينَ لَا يَدْعُونَ مَعَ اللهِ إِلَهًا آخَرَ وَلَا يَقْتُلُونَ النَّفْسَ الَّتِي حَرَّمَ اللهُ إِلَّا بِالْحَقِّ وَلَا يَزْنُونَ وَمَنْ يَفْعَلْ ذَلِكَ يَلْقَ أَثَامًا} [الفرقان 68]