The Prophet ﷺ said, "On the Day of Resurrection, it will be said to a man from among the people of the Fire, 'If you possessed everything on earth, would you offer it as ransom?' He will reply, 'Yes.' Then it will be said to him, 'I asked of you something far easier than that. I took a covenant from you while you were still in the loins of Adam that you would not associate anything with Me, but you refused and insisted on associating partners with Me.'"
حدثنا حجاج حدثني شعبة عن أبي عمران الجوني
عن النبي ﷺ قال يقال للرجل من أهل النار يوم القيامة أرأيت لو كان لك ما على الأرض من شيء أكنت مفتديا به قال فيقول نعم قال فيقول قد أردت منك أهون من ذلك قد أخذت عليك في ظهر آدم أن لا تشرك بي شيئا فأبيت إلا أن تشرك بي
Its isnad is sahih. Abu Imran Jawni is Abdul-Malik bin Habib. The hadith was narrated by Bukhari 8/164, in the book of Riqaq, chapter on the description of Paradise and Hellfire, and Muslim 4/2160, no. 2805, in the book of the description of the hypocrites, chapter on the disbeliever seeking ransom.