The Messenger of Allah ﷺ was asked, "Which sin is the greatest?"He replied, "That you set up a rival to Allah while He created you."The questioner asked, "Then which?"He said, "That you kill your child out of fear that he will eat with you."The questioner asked, "Then which?"He said, "That you commit adultery with your neighbor's wife."Abdullah said, "Then Allah revealed in confirmation of this, 'And those who do not invoke another god alongside Allah, nor kill the soul which Allah has forbidden except by right, nor commit adultery. Whoever does that will meet a penalty'" [Furqan 25:68].
حدثنا أبو معاوية حدثنا الأعمش عن شقيق
سئل رسول الله ﷺ أي الذنب أكبر قال أن تجعل لله ندا وهو خلقك قال ثم أي قال أن تقتل ولدك أن يطعم معك قال ثم أي قال أن تزاني حليلة جارك قال قال عبد الله فأنزل الله تصديق ذلك {والذين لا يدعون مع الله إلها آخر ولا يقتلون النفس التي حرم الله إلا بالحق ولا يزنون ومن يفعل ذلك يلق أثاما}
Its isnad is sahih. Ibn Kathir cited it in his Tafsir 6:194 from this passage, attributing it to Bukhari, Muslim, and Nasai. Suyuti attributed it in Durr Manthur 5:77 to Faryabi, Abd bin Humayd, Ibn Jareer, Ibn Munzir, and others. In Zakhair Mawarith 4799, it is mentioned that Abu Dawud also narrated it.