Abdullah bin Masud reported,

I asked, "Messenger of Allah, which sin is the greatest?"He replied, "That you set up a rival to Allah, when it is He who 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."Then Allah revealed in confirmation of the Prophet's ﷺ words, "And those who do not invoke another god alongside Allah" [Furqan 25:68].

Bukhari 6001

Sahih

حدثنا محمد بن كثير أخبرنا سفيان عن منصور عن أبي وائل عن عمرو بن شرحبيل

عن عبد الله قال

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

البخاري 6001صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Manners
Chapter
Killing one's child for fear that he will eat with him
Numbering
Darussalam 6001
Bukhari 6001