Sahih al-Bukhari 3400
Amr bin Muhammad told us that Ya'qub bin Ibrahim narrated to us; he said: My father told me. He narrated from Salih (bin Kaisan), and he from Ibn Shihab, that Ubaidullah bin Abdullah told him. It is narrated from Hazrat Ibn Abbas (ra) that he (that is, Hazrat Ibn Abbas (ra)) and Hurr bin Qais (ra) differed about the companion of Moses (as). Hazrat Ibn Abbas (ra) said: He is Khidr. Meanwhile Hazrat Ubayy bin Ka'b (ra) passed by the two of them. Hazrat Ibn Abbas (ra) called him and said: I and this companion of mine differ about that companion of Moses (as) whom Moses (as) asked the way to meet. Have you heard the Messenger of Allah (saw) describe him? He said: Yes, I heard the Messenger of Allah (saw) say: “Once Moses (as) was in a crowded gathering of the Children of Israel when a man came to him and asked: ‘Do you know anyone who is more learned than you?’ He said: ‘No.’ Then Allah revealed to Moses (as): ‘Rather, Our servant Khidr (is more learned than you).’ Moses (as) asked the way to reach him. So Allah appointed the fish as a sign for him, and he was told: ‘When you no longer find the fish, turn back. Then you will soon meet Khidr.’ So Moses (as) went on following the fish in the sea. His young man said to Moses (as): ‘Didst thou see, when we betook ourselves to the rock for rest, and I forgot the fish— and none but Satan caused me to forget to mention it to thee’ (Qur’an 18:64). Moses (as) said: ‘That is what we have been seeking.’ So they both returned, retracing their footsteps (Qur’an 18:65), and found Khidr. Then what happened to them is what Allah has related in His Book.”
AI-translated by Islam-Today
Book 27: The story of Al-Khidr with Musa (Moses) alayhis-salam