The Prophet ﷺ said, "Musa stood up to deliver a sermon to the Children of Israil. He was asked, 'Who is the most knowledgeable of people?' He answered, 'I am the most knowledgeable.' Allah reproached him for not referring the matter of knowledge back to Him, so Allah revealed to him that a servant of His at the junction of the two seas was more knowledgeable than him.Musa asked, 'My Lord, how can I reach him?'He was told, 'Carry a fish in a basket, and when you lose it, he will be there.'"He then mentioned the lengthy hadith about Musa's meeting with Khidr until he said, "The two of them set off walking along the seashore without a boat. A boat passed by them, and they spoke to its crew about taking them aboard. They recognized Khidr and carried them without charge. A sparrow then came and landed on the edge of the boat, dipping its beak into the sea once or twice. Khidr said, 'Musa, my knowledge and your knowledge compared to the knowledge of Allah is only like what this sparrow has taken from this sea.'"The hadith continues at length.
عن النبي ﷺ قال: قام موسى عليه السلام خطيبا في بني إسرائيل فسئل: أي الناس أعلم؟ فقال: أنا أعلم، فعتب الله عليه، إذ لم يرد العلم إليه، فأوحى الله إليه: أن عبدا من عبادي بمجمع البحرين هو أعلم منك. قال: يا رب كيف به؟ فقيل له: احمل حوتا في مكتل فإذا فقدته فهو ثم. فذكر الحديث بطوله في اجتماعه بالخضر إلى أن قال: فانطلقا يمشيان على ساحل البحر، ليس لهما سفينة، فمرت بهما سفينة فكلموهم أن يحملوهما، فعرف الخضر فحملوهما بغير نول، فجاء عصفور فوقع على حرف السفينة فنقر نقرة أو نقرتين في البحر، فقال الخضر: يا موسى، ما نقص علمي وعلمك من علم الله إلا كنقرة هذا العصفور في هذا البحر الحديث بطوله.
Bukhari narrated it in the Book of Knowledge (122), and Muslim in the Book of Virtues (2380), both from the hadith of Sufyan bin Uyayna, who said, Amr bin Dinar narrated to us, from Saeed bin Jubayr, who said, I said to Ibn Abbas, "Nawf al-Bikali claims that Musa , the companion of Banu Israil, is not the same as Musa
, the companion of Khidr!" He said, "The enemy of Allah has lied. I heard Ubayy bin Kaab say, I heard the Messenger of Allah ﷺ say" (then he mentioned the hadith in full), and it will come in its proper place in complete form.