Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Adam and Musa, peace be upon them, debated before their Lord, and Adam got the better of Musa in the argument.Musa said, 'You are Adam, whom Allah created with His own hand, into whom He breathed of His spirit, before whom He made His angels prostrate, and whom He housed in His Paradise. Then by your sin you brought humanity down to the earth.'Adam replied, 'You are Musa, whom Allah chose with His message and His direct speech, to whom He gave the Tablets containing the explanation of all things, and whom He drew near in private converse. By how many years did you find that Allah wrote the Torah before I was created?'Musa said, 'By forty years.'Adam asked, 'And did you find in it, "And Adam disobeyed his Lord and erred" [Taha 20:121]?'Musa said, 'Yes.'Adam said, 'Then do you blame me for doing a deed that Allah had written upon me to do forty years before He created me?'"The Messenger of Allah ﷺ said, "So Adam got the better of Musa in the argument."

Muslim 6744

Sahih

حدثنا إسحق بن موسى بن عبد الله بن موسى بن عبد الله بن يزيد الأنصاري حدثنا أنس بن عياض حدثني الحارث بن أبي ذباب عن يزيد وهو ابن هرمز وعبد الرحمن الأعرج قالا سمعنا

أبا هريرة قال

قال رسول الله ﷺ احتج آدم وموسى عليهما السلام عند ربهما فحج آدم موسى قال موسى أنت آدم الذي خلقك الله بيده ونفخ فيك من روحه وأسجد لك ملائكته وأسكنك في جنته ثم أهبطت الناس بخطيئتك إلى الأرض فقال آدم أنت موسى الذي اصطفاك الله برسالته وبكلامه وأعطاك الألواح فيها تبيان كل شيء وقربك نجيا فبكم وجدت الله كتب التوراة قبل أن أخلق قال موسى بأربعين عاما قال آدم فهل وجدت فيها {وعصى آدم ربه فغوى} قال نعم قال أفتلومني على أن عملت عملا كتبه الله علي أن أعمله قبل أن يخلقني بأربعين سنة قال رسول الله ﷺ فحج آدم موسى

مسلم 6744صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Decree
Chapter
Hajjaj between Adam and Musa, peace be upon them
Numbering
Darussalam 6744
Muslim 6744