He heard the Messenger of Allah ﷺ say, "My example and the example of people is like that of a man who kindled a fire. When it lit up everything around him, moths and insects that fall into fires began throwing themselves into it. He tried to drive them away, but they overwhelmed him and plunged into the flames. So I am holding you back by your waistbands from the Fire, yet you keep plunging into it."
أنه سمع رسول الله ﷺ يقول: إنما مثلي ومثل الناس كمثل رجل استوقد نارا، فلما أضاءت ما حوله جعل الفراش وهذه الدواب التي تقع في النار يقعن فيها، فجعل ينزعهن ويغلبنه، فيقتحمن فيها، فأنا آخذكم بحجزكم عن النار، وأنتم تقتحمون فيها.
Bukhari narrated it in Riqaq (6483), and Muslim in Fadail (17:2284), both of them through Abu Zinad, from Abdul-Rahman Araj, from Abu Hurairah, and he mentioned it. The wording is Bukhari's.