In the name of Allah, Most Gracious, Most Merciful.
64. [Mûsa (Moses)] said: “That is what we have been seeking.” So they went back retracing their footsteps.
65. Then they found one of Our slaves, unto whom We had bestowed mercy from Us, and whom We had taught knowledge from Us.
66. Mûsa (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 Allâh)?”
67. He (Khidr) said: “Verily! You will not be able to have patience with me!
68. “And how can you have patience about a thing which you know not?”
69. Mûsa (Moses) said: “If Allâh will, you will find me patient, and I will not disobey you in aught.”
70. He (Khidr) said: “Then, if you follow me, ask me not about anything till I myself mention it to you.”
71. So they both proceeded, till, when they embarked the ship, he (Khidr) scuttled it. Mûsa (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).”
72. He (Khidr) said: “Did I not tell you, that you would not be able to have patience with me?”
73. [Mûsa (Moses)] said: “Call me not to account for what I forgot, and be not hard upon me for my affair (with you).”
74. Then they both proceeded, till they met a boy, he (Khidr) killed him. Mûsa (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)!”
75. (Khidr) said: “Did I not tell you that you can have no patience with me?”
76. [Mûsa (Moses)] said: “If I ask you anything after this, keep me not in your company, you have received an excuse from me.”
77. 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. [Mûsa (Moses)] said: If you had wished, surely, you could have taken wages for it!”
78. (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.
79. “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.
80. “And as for the boy, his parents were believers, and we feared lest he should oppress them by rebellion and disbelief.
81. “So we intended that their Lord should change him for them for one better in righteousness and near to mercy.
82. “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.”
Sura 18. Al-Kahf (The Cave)
*Note: You can listen to a very good explanation of this story (I learned a lot) in three audio lectures series, the voyage of Musa (peace be upon him) here and Sura Kahf 80-81 a deeper look here and finally Sourate Kahf 82 a deeper look here.