The Messenger of Allah ﷺ said, "Allah will gather the people on the Day of Resurrection, and they will be deeply distressed by it." In another narration, "They will be inspired regarding it, and they will say, 'If only we could seek someone to intercede for us with our Lord, that He might relieve us from this place of ours.' So they will come to Adam and say, 'You are Adam, the father of all creation. Allah created you with His own hand and breathed into you from His spirit...'"He then narrated the hadith in its full length, which is the hadith of intercession.
قال رسول الله ﷺ: يجمع الله الناس يوم القيامة، فيهتمون لذلك وفي رواية: فيلهمون لذلك فيقولون: لو استشفعنا على ربنا حتى يريحنا من مكاننا هذا، فيأتون آدم فيقولون: أنت آدم أبو الخلق خلقك الله بيده ونفخ فيك من روحه… فذكر الحديث بطوله، وهو حديث الشفاعة.
Bukhari narrated it in the Book of Raqaq (6565), and Muslim in the Book of Iman (193), both from the hadith of Abu Awana, from Qatada, from Anas, who related the hadith in full. It is mentioned in the lengthy hadith of intercession.