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."
قال رسول الله ﷺ: احتج آدم وموسى عليهما السلام عند ربهما. فحج آدم موسى. قال موسى: أنت آدم الذي خلقك الله بيده، ونفخ فيك من روحه، وأسجد لك ملائكته، وأسكنك في جنته، ثم أهبطت الناس بخطيئتك إلى الأرض؟ فقال آدم: أنت موسى الذي اصطفاك الله برسالته وبكلامه، وأعطاك الألواح فيها تبيان كل شيء، وقربك نجيا، فبكم وجدت الله كتب التوراة قبل أن أخلق؟ قال موسى: بأربعين عاما. قال آدم: فهل وجدت فيها: وعصي آدم ربه فغوي؟ قال: نعم. قال: أفتلومني على أن عملت عملا كتبه الله على أن أعمله قبل أن يخلقني بأربعين سنة؟ قال رسول الله ﷺ: فحج آدم موسى.
Muslim narrated it in the Book of Divine Decree (2652:15), from Ishaq bin Musa bin Abdullah bin Musa bin Abdullah bin Yazid Ansari, who said, "Anas bin Iyad narrated to us, Harith narrated to me, from Yazid (who is Ibn Hurmuz) and Abdul-Rahman Araj, both of whom said, 'We heard Abu Hurairah mention the fly,'" then he narrated the hadith.