The Prophet ﷺ said, "Allah the Exalted will say to the one receiving the lightest punishment among the people of the Fire on the Day of Resurrection, 'If you possessed everything on earth, would you offer it as ransom?'He will reply, 'Yes.'Allah will say, 'I asked of you something easier than this while you were still in the loins of Adam, that you not associate anything with Me, but you refused and insisted on associating partners with Me.'"
عن النبي ﷺ قال: يقول الله تعالى لأهون أهل النار عذابا يوم القيامة: لو أن لك ما في الأرض من شيء أكنت تفتدي به؟ فيقول: نعم، فيقول: أردت منك أهون من هذا، وأنت صلب آدم: أن لا تشرك بي شيئا، فأبيت إلا أن تشرك بي.
Bukhari related it in the Book of Softening of Hearts (6557), and Muslim in the Book of Paradise (2805), both through the route of Shubah, from Abu Imran, from Anas, who narrated it as mentioned.Ibn Hajar commented on the phrase, "while you were still in the loins of Adam," noting that it alludes to the words of Allah Almighty, "And when your Lord took from the children of Adam, from their loins, their descendants, and made them testify concerning themselves, saying, 'Am I not your Lord,' they said, 'Yes, we bear witness.' This, lest you should say on the Day of Resurrection, 'We were unaware of this'" [Araf 7:172].See Fath al-Bari (6/369).