Narrated Sa`id bin Jubair:

I said to Ibn `Abbas, "Nauf-al-Bakali " claims that Moses of Bani Israel was not Moses, the companion of Al-Khadir." Ibn `Abbas said, "Allah's enemy tells a lie! Ubai bin Ka`b narrated to us that Allah's Messenger (ﷺ) said, 'Moses got up to deliver a sermon before Bani Israel and he was asked, 'Who is the most learned person among the people?' Moses replied, 'I (am the most learned).' Allah then admonished Moses for he did not ascribe all knowledge to Allah only (Then) came the Divine Inspiration:-- 'Yes, one of Our slaves at the junction of the two seas is more learned than you.' Moses said, 'O my Lord ! How can meet him?' Allah said, 'Take a fish in a basket and wherever the fish is lost, follow it (you will find him at that place). So Moses set out along with his attendant Yusha` bin Noon, and they carried with them a fish till they reached a rock and rested there. Moses put his head down and slept. (Sufyan, a sub-narrator said that somebody other than `Amr said) 'At the rock there was a water spring called 'Al-Hayat' and none came in touch with its water but became alive. So some of the water of that spring fell over that fish, so it moved and slipped out of the basket and entered the sea. When Moses woke up, he asked his attendant, 'Bring our early meal' (18.62). The narrator added: Moses did not suffer from fatigue except after he had passed the place he had been ordered to observe. His attendant Yusha` bin Noon said to him, 'Do you remember (what happened) when we betook ourselves to the rock? I did indeed forget (about) the fish ...' (18.63) The narrator added: So they came back, retracing their steps and then they found in the sea, the way of the fish looking like a tunnel. So there was an astonishing event for his attendant, and there was tunnel for the fish. When they reached the rock, they found a man covered with a garment. Moses greeted him. The man said astonishingly, 'Is there any such greeting in your land?' Moses said, 'I am Moses.' The man said, 'Moses of Bani Israel?' Moses said, 'Yes,' and added, 'may I follow you so that you teach me something of the Knowledge which you have been taught?' (18.66). Al-Khadir said to him, 'O Moses! You have something of Allah's knowledge which Allah has taught you and which I do not know; and I have something of Allah's knowledge which Allah has taught me and which you do not know.' Moses said, 'But I will follow you.' Al-Khadir said, 'Then if you follow me, ask me no question about anything until I myself speak to you concerning it.' (18.70). After that both of them proceeded along the seashore. There passed by them a boat whose crew recognized Al-Khadir and received them on board free of charge. So they both got on board. A sparrow came and sat on the edge of the boat and dipped its beak unto the sea. Al-Khadir said to Moses. 'My knowledge and your knowledge and all the creation's knowledge compared to Allah's knowledge is not more than the water taken by this sparrow's beak.' Then Moses was startled by Al-Khadir's action of taking an adze and scuttling the boat with it. Moses said to him, 'These people gave us a free lift, but you intentionally scuttled their boat so as to drown them. Surely you have...' (18.71) Then they both proceeded and found a boy playing with other boys. Al-Khadir took hold of him by the head and cut it off. Moses said to him, 'Have you killed an innocent soul who has killed nobody? Surely you have done an illegal thing! ' (18.74) He said, "Didn't I tell you that you will not be able to have patient with me up to ..but they refused to entertain them as their guests. There they found a wall therein at the point of collapsing.' (18.75-77) Al-Khadir moved his hand thus and set it upright (repaired it). Moses said to him, 'When we entered this town, they neither gave us hospitality nor fed us; if you had wished, you could have taken wages for it,' Al- Khadir said, 'This is the parting between you and me I will tell you the interpretation of (those things) about which you were unable to hold patience.'...(18.78) Allah's Messenger (ﷺ) said, 'We wished that Moses could have been more patient so that He (Allah) could have described to us more about their story.' Ibn `Abbas used to recite:-- 'And in front (ahead) of them there was a king who used to seize every (serviceable) boat by force. (18.79) ...and as for the boy he was a disbeliever. "

حَدَّثَنِي قُتَيْبَةُ بْنُ سَعِيدٍ، قَالَ حَدَّثَنِي سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ عَمْرِو بْنِ دِينَارٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، قَالَ قُلْتُ لاِبْنِ عَبَّاسٍ إِنَّ نَوْفًا الْبَكَالِيَّ يَزْعُمُ أَنَّ مُوسَى بَنِي إِسْرَائِيلَ لَيْسَ بِمُوسَى الْخَضِرِ‏.‏ فَقَالَ كَذَبَ عَدُوُّ اللَّهِ حَدَّثَنَا أُبَىُّ بْنُ كَعْبٍ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ قَامَ مُوسَى خَطِيبًا فِي بَنِي إِسْرَائِيلَ فَقِيلَ لَهُ أَىُّ النَّاسِ أَعْلَمُ قَالَ أَنَا، فَعَتَبَ اللَّهُ عَلَيْهِ، إِذْ لَمْ يَرُدَّ الْعِلْمَ إِلَيْهِ، وَأَوْحَى إِلَيْهِ بَلَى عَبْدٌ مِنْ عِبَادِي بِمَجْمَعِ الْبَحْرَيْنِ، هُوَ أَعْلَمُ مِنْكَ قَالَ أَىْ رَبِّ كَيْفَ السَّبِيلُ إِلَيْهِ قَالَ تَأْخُذُ حُوتًا فِي مِكْتَلٍ فَحَيْثُمَا فَقَدْتَ الْحُوتَ فَاتَّبِعْهُ قَالَ فَخَرَجَ مُوسَى، وَمَعَهُ فَتَاهُ يُوشَعُ بْنُ نُونٍ، وَمَعَهُمَا الْحُوتُ حَتَّى انْتَهَيَا إِلَى الصَّخْرَةِ، فَنَزَلاَ عِنْدَهَا قَالَ فَوَضَعَ مُوسَى رَأْسَهُ فَنَامَ ـ قَالَ سُفْيَانُ وَفِي حَدِيثِ غَيْرِ عَمْرٍو قَالَ ـ وَفِي أَصْلِ الصَّخْرَةِ عَيْنٌ يُقَالُ لَهَا الْحَيَاةُ لاَ يُصِيبُ مِنْ مَائِهَا شَىْءٌ إِلاَّ حَيِيَ، فَأَصَابَ الْحُوتَ مِنْ مَاءِ تِلْكَ الْعَيْنِ، قَالَ فَتَحَرَّكَ، وَانْسَلَّ مِنَ الْمِكْتَلِ، فَدَخَلَ الْبَحْرَ فَلَمَّا اسْتَيْقَظَ مُوسَى ‏{‏قَالَ لِفَتَاهُ آتِنَا غَدَاءَنَا‏}‏ الآيَةَ قَالَ وَلَمْ يَجِدِ النَّصَبَ حَتَّى جَاوَزَ مَا أُمِرَ بِهِ، قَالَ لَهُ فَتَاهُ يُوشَعُ بْنُ نُونٍ ‏{‏أَرَأَيْتَ إِذْ أَوَيْنَا إِلَى الصَّخْرَةِ فَإِنِّي نَسِيتُ الْحُوتَ‏}‏ الآيَةَ قَالَ فَرَجَعَا يَقُصَّانِ فِي آثَارِهِمَا، فَوَجَدَا فِي الْبَحْرِ كَالطَّاقِ مَمَرَّ الْحُوتِ، فَكَانَ لِفَتَاهُ عَجَبًا، وَلِلْحُوتِ سَرَبًا قَالَ فَلَمَّا انْتَهَيَا إِلَى الصَّخْرَةِ، إِذْ هُمَا بِرَجُلٍ مُسَجًّى بِثَوْبٍ، فَسَلَّمَ عَلَيْهِ مُوسَى قَالَ وَأَنَّى بِأَرْضِكَ السَّلاَمُ فَقَالَ أَنَا مُوسَى‏.‏ قَالَ مُوسَى بَنِي إِسْرَائِيلَ قَالَ نَعَمْ هَلْ أَتَّبِعُكَ عَلَى أَنْ تُعَلِّمَنِي مِمَّا عُلِّمْتَ رَشَدًا‏.‏ قَالَ لَهُ الْخَضِرُ يَا مُوسَى إِنَّكَ عَلَى عِلْمٍ مِنْ عِلْمِ اللَّهِ عَلَّمَكَهُ اللَّهُ لاَ أَعْلَمُهُ، وَأَنَا عَلَى عِلْمٍ مِنْ عِلْمِ اللَّهِ عَلَّمَنِيهِ اللَّهُ لاَ تَعْلَمُهُ‏.‏ قَالَ بَلْ أَتَّبِعُكَ‏.‏ قَالَ فَإِنِ اتَّبَعْتَنِي فَلاَ تَسْأَلْنِي عَنْ شَىْءٍ حَتَّى أُحْدِثَ لَكَ مِنْهُ ذِكْرًا، فَانْطَلَقَا يَمْشِيَانِ عَلَى السَّاحِلِ فَمَرَّتْ بِهِمَا سَفِينَةٌ فَعُرِفَ الْخَضِرُ فَحَمَلُوهُمْ فِي سَفِينَتِهِمْ بِغَيْرِ نَوْلٍ ـ يَقُولُ بِغَيْرِ أَجْرٍ ـ فَرَكِبَا السَّفِينَةَ قَالَ وَوَقَعَ عُصْفُورٌ عَلَى حَرْفِ السَّفِينَةِ، فَغَمَسَ مِنْقَارَهُ الْبَحْرَ فَقَالَ الْخَضِرُ لِمُوسَى مَا عِلْمُكَ وَعِلْمِي وَعِلْمُ الْخَلاَئِقِ فِي عِلْمِ اللَّهِ إِلاَّ مِقْدَارُ مَا غَمَسَ هَذَا الْعُصْفُورُ مِنْقَارَهُ قَالَ فَلَمْ يَفْجَأْ مُوسَى، إِذْ عَمَدَ الْخَضِرُ إِلَى قَدُومٍ فَخَرَقَ السَّفِينَةَ، فَقَالَ لَهُ مُوسَى قَوْمٌ حَمَلُونَا بِغَيْرِ نَوْلٍ، عَمَدْتَ إِلَى سَفِينَتِهِمْ فَخَرَقْتَهَا ‏{‏لِتُغْرِقَ أَهْلَهَا لَقَدْ جِئْتَ‏}‏ الآيَةَ فَانْطَلَقَا إِذَا هُمَا بِغُلاَمٍ يَلْعَبُ مَعَ الْغِلْمَانِ، فَأَخَذَ الْخَضِرُ بِرَأْسِهِ فَقَطَعَهُ‏.‏ قَالَ لَهُ مُوسَى ‏{‏أَقَتَلْتَ نَفْسًا زَكِيَّةً بِغَيْرِ نَفْسٍ لَقَدْ جِئْتَ شَيْئًا نُكْرًا * قَالَ أَلَمْ أَقُلْ لَكَ إِنَّكَ لَنْ تَسْتَطِيعَ مَعِيَ صَبْرًا‏}‏ إِلَى قَوْلِهِ ‏{‏فَأَبَوْا أَنْ يُضَيِّفُوهُمَا فَوَجَدَا فِيهَا جِدَارًا يُرِيدُ أَنْ يَنْقَضَّ‏}‏ فَقَالَ بِيَدِهِ هَكَذَا فَأَقَامَهُ، فَقَالَ لَهُ مُوسَى إِنَّا دَخَلْنَا هَذِهِ الْقَرْيَةَ، فَلَمْ يُضَيِّفُونَا وَلَمْ يُطْعِمُونَا، لَوْ شِئْتَ لاَتَّخَذْتَ عَلَيْهِ أَجْرًا‏.‏ قَالَ هَذَا فِرَاقُ بَيْنِي وَبَيْنِكَ سَأُنَبِّئُكَ بِتَأْوِيلِ مَا لَمْ تَسْتَطِعْ عَلَيْهِ صَبْرًا‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ وَدِدْنَا أَنَّ مُوسَى صَبَرَ حَتَّى يُقَصَّ عَلَيْنَا مِنْ أَمْرِهِمَا ‏"‏‏.‏ قَالَ وَكَانَ ابْنُ عَبَّاسٍ يَقْرَأُ وَكَانَ أَمَامَهُمْ مَلِكٌ يَأْخُذُ كُلَّ سَفِينَةٍ صَالِحَةٍ غَصْبًا، وَأَمَّا الْغُلاَمُ فَكَانَ كَافِرًا‏.‏
USC-MSA web (English) reference : Vol. 6, Book 60, Hadith 251
Arabic reference : Book 65, Hadith 4727