Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Adam and Musa, peace be upon them, disputed before their Lord, and Adam prevailed over 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 settled 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 speech, to whom He gave the Tablets containing the explanation of all things, and whom He drew near in intimate converse. By how many years did you find that Allah wrote the Torah before He created me?"Musa said, "By forty years."Adam said, "Then did you find in it, 'And Adam disobeyed his Lord and erred' [Ta-Ha 20:121]?"Musa said, "Yes."Adam said, "Do you then blame me for doing a deed which Allah had decreed for me to do forty years before He created me?"The Messenger of Allah ﷺ said, "So Adam prevailed over Musa in the argument."

Azami 1061

Sahih

عن أبي هريرة، قال

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

الأعظمي 1061صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Hajjaj between Adam and Musa, peace be upon them
Numbering
Jami al-Kamil 1061 (2nd edition)
Azami 1061