It was revealed to Hazrat Musa (Moses) that there is a man who has vast knowledge than him, Moses prayed to Allah about his willing to meet the person (Hazrat Khizr), then he was ordered to make a journey, take a cooked fish and you will meet him (Hazrat Khizr) at the place where this fish will missing. Musa started his journey to search for Hazrat Khizr and on how he met him and what are the reasons behind the three acts done by Khizr, please read this interesting and meaningful story.
[Taken from Qur’anic verses from 60 to 82 of Surah Kahf (18)]
And (remember) when Musa (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 through the sea as in a tunnel. So when they had passed further on (beyond that fixed place), Musa (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 rock? I indeed forgot the fish, none but Shaytan (Satan) made me forget to remember it. It took its course into the sea in a strange (way)!” [Musa (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.
Musa (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?” Musa (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 embarked the ship, he (Khidr) scuttled it. Musa (Moses) said: “Have you scuttled it in order to drown its people? Verily, you have committed a thing “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?” [Musa (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. Musa (Moses) said: “Have you killed an innocent person who had killed none? Verily, you have committed a thing “Nukra” (a great Munkar – prohibited, evil, dreadful thing)!” (Khidr) said: “Did I not tell you that you can have no patience with me?” [Musa (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. [Musa (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 MasÃ¢kÃ®n (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.”