Abdullah bin Masud reported,

I asked, or it was asked of, the Messenger of Allah ﷺ, "Which sin is greatest in the sight of Allah?"He replied, "That you set up a rival to Allah, while He created you."I asked, "Then which?"He said, "That you kill your child out of fear that he will eat with you."I asked, "Then which?"He said, "That you commit adultery with your neighbor's wife."He said, then this verse was revealed confirming the words of the Messenger of Allah ﷺ, "And those who do not invoke another god alongside Allah, nor kill the soul that Allah has forbidden except by right, nor commit adultery" [Furqan 25:68].

Bukhari 4761

Sahih

حدثنا مسدد حدثنا يحيى عن سفيان قال حدثني منصور وسليمان عن أبي وائل عن أبي ميسرة عن عبد الله ح قال وحدثني واصل عن أبي وائل

عن عبد الله رضي الله عنه قال

سألت أو سئل رسول الله ﷺ أي الذنب عند الله أكبر قال أن تجعل لله ندا وهو خلقك قلت ثم أي قال ثم أن تقتل ولدك خشية أن يطعم معك قلت ثم أي قال أن تزاني بحليلة جارك قال ونزلت هذه الآية تصديقا لقول رسول الله ﷺ {والذين لا يدعون مع الله إلها آخر ولا يقتلون النفس التي حرم الله إلا بالحق ولا يزنون}

البخاري 4761صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "And those who do not invoke with Allah another deity or kill the soul which Allah has forbidden except by right, and do not commit unlawful sexual intercourse. And whoever does that will meet a penalty," meaning the punishment
Numbering
Darussalam 4761
Bukhari 4761