One day, Moses delivered such an impressive sermon that all who heard it were deeply moved. Someone in the congregation asked: "0 Messenger of Allah, is there another man on earth more learned than you?" Moses replied: "No!", believing so, as Allah had given him the power of miracles and honored him with the Torah.
However, Allah revealed to Moses that no man could know all there is to know, nor would one messenger alone be the custodian of all knowledge. There would always be another who knew what others did not. Moses asked Allah: "0 Allah, where is this man? I would like to meet him and learn from him." He also asked for a sign to this person's identity.
Allah instructed him to take a live fish in a water-filled vessel. Where the fish disappeared, he would find the man he sought. Moses set out on his journey, accompanied by a young man who carried the vessel with the fish. They reached a place where two rivers met and decided to rest there. Instantly, Moses fell asleep.
While he was asleep, his companion saw the fish wriggle out of the vessel into the river and swim away. However, he forgot to relate this incident to Moses. When he awoke, they continued their journey until they were exhausted and hungry. Moses asked for his morning meal. Only then did his companion recall that the fish they had brought with them had gotten away. Hearing this, Moses exclaimed: 'This is exactly what we are seeking!" They hurriedly retraced their steps to the place where the rivers met and where the fish had jumped out. There they found a man, his face partly covered with a hood. His bearing showed he was a saintly man. He was Al-Khidr, the guide.
Allah the Almighty narrated: And (remember) when Moses said to his boy-servant: "I will not give up (traveling) until I reach the junction of the two seas or (until) I spend years and years in traveling."
But when they reached the junction of the two seas, they forgot their fish, and it took its way throught the sea as in a tunnel. So when they had passed further on (beyond that fixed place), Moses said to his boy-servant: "Bring us our morning meal; truly, we have suffered much fatigue in this, our journey."
He said: "Do you remember when we betook ourselves to the ock? I indeed forgot the fish, none but Satan made me forget to remember it. It took its course into the sea in a strange (way)!"
(Moses) said: "That is what we have been seeking." So they went back retracing their footsteps.
Then they found one of Our slaves, unto whom We had bestowed mercy from Us, and whom We had taught knowledge from Us. Surah 18: 60-65
Moses said to him (Khidr) "May I follow you so that you teach me something of that knowledge (guidance and true path) which you have been taught (by Allah)?"
He (Khidr) said: "Verily! You will not be able to have patience with me! And how can you have patience about a thing which you know not?"
Moses said: "If Allah will, you will find me patient, and I will not disobey you in aught."
He (Khidr) said: "Then, if you follow me, ask me not about anything till I myself mention it to you.
So they both proceeded, till, when they were in the ship, he (Khidr) scuttled it. Moses said: "Have you scuttled it in order to drown its people? Verily, you have done Imra - a Munkar (evil, bad, dreadful) thing."
He (Khidr) said: "Did I not tell you, that you would not be able to have patience with me?"
(Moses) said: "Call me not to account for what I forgot, and be not hard upon me for my affair (with you)."
Then they both proceeded, till they met a boy, he (Khidr) killed him. Moses said: "Have you killed an innocent person who had killed none? Verily, you have done Nukra a great Munkar (prohibited, evil, dreadful) thing!"
(Khidr) said: "Did I not tell you that you can have no patience with me?"
(Moses) said: "If I ask you anything after this, keep me not in your company, you have received an excuse from me."
Then they both proceeded, till, when they came to the people of a town, they asked them for food, but they refused to entertain them. Then they found therein a wall about to collapse and he (Khidr) set it up straight. (Moses) said: "If you had wished, surely you could have taken wages for it!"
(Khidr) said: "This is the parting between me and you. I will tell you the interpretation of (those) things over which you were unable to hold patience.
'As for the ship, it belonged to poor people working in the sea. So I wished to make a defective damage in it, as there was a king after them who seized every ship by force.
"And as for the boy, his parents were believers, and we feared lest he should oppress them by rebellion and disbelief. So we intended that their Lord should change him for them for one better in righteousness and near to mercy.
"And as for the wall, it belonged to two orphan boys in the town; and there was under it a treasure belonging to them; and their father was a righteous man, and your Lord intended that they should attain their age of full strength and take out their treasure as a mercy from your Lord. And I did it not of my own accord. That is the interpretation of those (things) over which you could not hold patience. Surah 18: 60-82
The story of Moses and Al-Khidr is also told in a hadith. Said Ibn Jubair said: "I said to Ibn Abbas, 'Nauf Al-Bukah claims that Moses, the companion of Al-Khidr, was not Moses (the prophet) of the children of Israel, but some other Moses.' Ibn Abbas said: 'Allah's enemy (i.e. Nauf) has told a lie. Ubai Ibn Kab told us that the Prophet said: Once Moses stood up and addressed Bani Israel. He was asked who was the most learned man amongst the people. He said: "I." Allah admonished him as he did not attribute absolute knowledge to Him (Allah). So, Allah said to him: 'Yes, at the junction of the two seas there is a slave of Mine who is more learned than you." Moses said: "0 my Lord! How can I meet him?" Allah said: "Take a fish and put it in a large basket and you will find him at the place where you will lose the fish."
Moses took a fish and put it in a basket and proceeded along with his (servant) boy, Joshua (Yusha Ibn Nun), till they reached the rock where they laid their heads (i.e. lay down). Moses slept, and the fish, moving out of the basket, fell into the sea. It took its way into the sea (straight) as in a tunnel. Allah stopped the flow of water over the fish and it became like an arch (the Prophet pointed out this arch with his hands). They traveled the rest of the night, and the next day Moses said to his boy (servant): "Give us our food, for indeed, we have suffered much fatigue in this journey of ours." Moses did not feel tired till he crossed that place which Allah had ordered him to seek after. His boy (servant) said to him: "Do you know that when we were sitting near that rock, I forgot the fish, and none but Satan caused me to forget to tell (you) about it, and it took its course into the sea in an amazing way?" So there was a path for the fish and that astonished them. Moses said: 'That was what we were seeking after."
So both of them retraced their footsteps till they reached the rock. There they saw a man lying covered with a garment.
Moses greeted him, and he replied saying: "How do people greet each other in your land?" Moses said: "I am Moses."
The man asked: "Moses of Bani Israel?" Moses said: 'Yes, I have come to you so that you may teach me from those things which Allah has taught you." He said: "0 Moses! I have some of the knowledge of Allah which Allah has taught me and which you do not know, while you have some of the knowledge of Allah which Allah has taught you and which I do not know." Moses asked: "May I follow you?" He said: "But you will not be able to remain patient with me, for how can you be patient about things which you will not be able to understand?" Moses said: 'You will find me, if Allah so will, truly patient, and I will not disobey you in aught."
So both of them set out walking along the sea-shore. A boat passed by them, and they asked the crew of the boat to take them on board. The crew recognized Al-Khidr, so they took them on board without fare. When they were on board the boat, a sparrow came and stood on the edge of the boat and dipped its beak once or twice into the sea. Al-Khidr said to Moses: "0 Moses! My knowledge and your knowledge have not decreased Allah's knowledge except as much as this sparrow has decreased the water of the sea with its beak." Then suddenly Al-Khidr took an adze and pulled up a plank, and Moses did not notice it till he had pulled up a plank with the adze. Moses said to him: "What have you done? They took us on board charging us nothing; yet you have intentionally made a hole in their boat so as to drown its passengers. Verily, you have done a dreadful thing." AlKhidr replied: "Did I not tell you that you would not be able to remain patient with me?" Moses replied: "Do not blame me for what I have forgotten, and do not be hard upon me for my fault." So the first excuse of Moses was that he had forgotten.
When they had left the sea, they passed by a boy playing with other boys. Al-Khidr took hold of the boy's head and plucked it with his hand like this. (Sufyan, the sub-narrator gestured with his fingertips as if he were plucking some fruit.) Moses said to him: "Have you killed an innocent person who has not killed any person? You have really done a horrible thing." Al-Khidr said: "Did I not tell you that you could not remain patient with me?" Moses said: "If I ask you about anything after this, don't accompany me. You have received an excuse from me."
Then both of them went on till they came to some people of a village, and they asked its inhabitants for food but they refused to entertain them as guests. Then they saw therein a wall which was just going to collapse and Al Khidr repaired it just by touching it with his hands. (Sufyan, the subnarrator, gestured with his hands, illustrating how Al-Khidr passed his hands over the wall upwards.) Moses said: "These are the people whom we have called on, but they neither gave us food, nor entertained us as guests, yet you have repaired their wall. If you had wished, you could have taken wages for it."
Al-Khidr said: "This is the parting between you and me, and I shall tell you the explanation of those things on which you could not remain patient."
The Prophet added: "We wish that Moses could have remained patient by virtue of which Allah might have told us more about their story." (Sufyan, the sub-narrator, said that the Prophet said: "May Allah bestow His Mercy on Moses! If he had remained patient, we would have been told further about their case.")'