Language:
كتاب أحاديث الأنبياء
60  
Prophets
(1)
Chapter: The creation of Adam and his offspring
(1)
بَابُ خَلْقِ آدَمَ صَلَوَاتُ اللَّهِ عَلَيْهِ وَذُرِّيَّتِهِ
Sahih al-Bukhari 3334

Narrated Anas:

The Prophet (ﷺ) said, "Allah will say to that person of the (Hell) Fire who will receive the least punishment, 'If you had everything on the earth, would you give it as a ransom to free yourself (i.e. save yourself from this Fire)?' He will say, 'Yes.' Then Allah will say, 'While you were in the backbone of Adam, I asked you much less than this, i.e. not to worship others besides Me, but you insisted on worshipping others besides me.' "

حَدَّثَنَا قَيْسُ بْنُ حَفْصٍ، حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي عِمْرَانَ الْجَوْنِيِّ، عَنْ أَنَسٍ، يَرْفَعُهُ ‏ "‏ أَنَّ اللَّهَ، يَقُولُ لأَهْوَنِ أَهْلِ النَّارِ عَذَابًا لَوْ أَنَّ لَكَ مَا فِي الأَرْضِ مِنْ شَىْءٍ كُنْتَ تَفْتَدِي بِهِ قَالَ نَعَمْ‏.‏ قَالَ فَقَدْ سَأَلْتُكَ مَا هُوَ أَهْوَنُ مِنْ هَذَا وَأَنْتَ فِي صُلْبِ آدَمَ أَنْ لاَ تُشْرِكَ بِي‏.‏ فَأَبَيْتَ إِلاَّ الشِّرْكَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 3334
In-book reference : Book 60, Hadith 9
USC-MSA web (English) reference : Vol. 4, Book 55, Hadith 551
  (deprecated numbering scheme)