Sahih Muslim 86 b
It is narrated on the authority of Abdullah b. Mas'ud that a man said:
Messenger of Allah, which offence is the most grievous in the eye of Allah? He (the Holy Prophet) replied: That you associate a partner with Allah (despite the fact) that He created you. He (the man) said: What next? He (the Holy Prophet) replied: That you kill your child out of fear that he would join you in food. He (the inquirer) said (again): What next? He (the Holy Prophet) replied: That you commit adultery with the wife of your neighbour. And the Almighty and Exalted Lord testified it (with this verse): 
All those who call not unto another god along with Allah, and slay not any soul which Allah has forbidden, except in the cause of justice, nor commit fornication, and he who does this shall meet a requital of sin (xxv. 68).
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، جَمِيعًا عَنْ جَرِيرٍ، قَالَ عُثْمَانُ حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي وَائِلٍ، عَنْ عَمْرِو بْنِ شُرَحْبِيلَ، قَالَ قَالَ عَبْدُ اللَّهِ قَالَ رَجُلٌ يَا رَسُولَ اللَّهِ أَىُّ الذَّنْبِ أَكْبَرُ عِنْدَ اللَّهِ قَالَ ‏"‏ أَنْ تَدْعُوَ لِلَّهِ نِدًّا وَهُوَ خَلَقَكَ ‏"‏ ‏.‏ قَالَ ثُمَّ أَىٌّ قَالَ ‏"‏ أَنْ تَقْتُلَ وَلَدَكَ مَخَافَةَ أَنْ يَطْعَمَ مَعَكَ ‏"‏ ‏.‏ قَالَ ثُمَّ أَىٌّ قَالَ ‏"‏ أَنْ تُزَانِيَ حَلِيلَةَ جَارِكَ ‏"‏ فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ تَصْدِيقَهَا ‏{‏ وَالَّذِينَ لاَ يَدْعُونَ مَعَ اللَّهِ إِلَهًا آخَرَ وَلاَ يَقْتُلُونَ النَّفْسَ الَّتِي حَرَّمَ اللَّهُ إِلاَّ بِالْحَقِّ وَلاَ يَزْنُونَ وَمَنْ يَفْعَلْ ذَلِكَ يَلْقَ أَثَامًا‏}‏