It appeared that Pharaoh would never believe in Moses's message, nor would he stop the torture of the children of Israel. Therefore, Moses prayed to his Lord thus: "Our Lord! You have indeed bestowed on Pharaoh and his chiefs splendor and wealth in the life of this world, our Lord! That they may lead men astray from Your Path. Our Lord! Destroy their wealth, and harden their hearts, so that they will not believe until they see the painful torment."
Allah said: "Verily, the invocation of you both is accepted. So you both keep to the Straight Way (i.e. keep on doing good deeds and preaching Allah's Message with patience), and follow not the path of those who know not (the truth i.e. to believe in the Oneness of Allah, and also to believe in the Reward of Allah: Paradise etc.)." Surah 10: 88-89
Allah inspired Moses to conduct his people out of Egypt, but only a few of his people believed in his message. Allah revealed: But none believed in Moses except the offspring of his people, because of the fear of Pharaoh and his chiefs, lest they should persecute them; and verily, Pharaoh was an arrogant tyrant on the earth, he was indeed one of the Musrifeen (polyt heists, sinners and transgressors, those who give up the truth and follow the evil, and commit all kinds of great sins).
And Moses said: "0 my people! If you have believed in Allah, then put your trust in Him if you are Muslims (those who submit to Allah's Will)."
They said. "In Allah we put our trust. Our Lord! Make us not a trial for the folk who are Zalimeen (polytheists and wrong-doing) (i.e. do not make them overpower us). And save us by Your Mercy from the disbelieving folk." Surah 10: 83-86
Almighty Allah decided to put an end to Pharaoh's crimes after He had given him several chances. Allah commanded Moses to depart, and the children of Israel received reluctant permission from Pharaoh to go out of the city for their feast. They prepared themselves to leave Egypt. This later became known as the Exodus. They carried with them their jewels and borrowed a lot of jewels from the Egyptians.
In the darkness of night, Moses led his people towards the Red Sea, and in the morning they reached the beach. By then Pharaoh was aware of their departure, so he mobilized a huge army to pursue them.
The impatient children of Israel soon became agitated and Joshua (Yusha), Ibn Nun, exclaimed: "In front of us is this impassable barrier, the sea, and behind us the enemy; surely death cannot be avoided!"
Moses replied that he would wait for further guidance from Allah. These words filled them with some hope, but man is always impatient for results: they were willing to surrender themselves back into slavery. At that moment Allah revealed to Moses: "Smite the sea with your staff!" Moses did as he was commanded. A fierce wind blew, the sun shone brightly, and in a flash the sea parted, the crests of the waves standing like mountains on each side.
Moses led his people across. This miracle proved Moses's oft repeated claim: "Verily! My Lord is with me!" As they looked back, they saw Pharaoh and his army approaching, about to take the very path which had been opened for them. In great fear and panic, they pleaded with Moses to ask Allah to close the sea. However, Allah commanded Moses not to smite the sea with his staff again, for Allah's decree was already in action.
Pharaoh and his army had seen the miracle, how the sea had parted, but being the pretender that he was, Pharaoh turned to his men and proclaimed: "Look! The sea has opened at my command so that I may follow those rebels and arrest them!" They rushed across the parted waters, and when they were midway, Allah commanded the sea to return to its former state.
Terror-stricken Pharaoh, realizing that his end had come, declared out of fear: "I believe that there is no god worthy of worship except Allah in Whom the children of Israel believe, and I am of those who surrender to Him." But Allah did not accept this declaration from the tyrant, and the waters closed over him, drowning him and his entire army.
Almighty Allah narrated: And We inspired Moses, saying: "Take away My slaves by night, verily, you will be pursued." Then Pharaoh sent callers to (all) the cities. (Saying): "Verily! These indeed are but a small band. And verily, they have done what has enraged us; but we are host all assembled, amply fore-warned."
So, We expelled them from gardens and springs, treasures, and every kind of honorable place. Thus We turned them (Pharaoh's people) out and We caused the children of Israel to inherit them.
So they pursued them at sunrise. And when the two hosts saw each other, the people of Moses said: "We are sure to be overtaken."
Moses said: "Nay, verily! With me is my Lord, He will guide me."
Then We inspired Moses (saying): "Strike the sea with your stick." And it parted, and each separate (part of that sea water) became like the huge, firm mass of a mountain.
Then We brought near the others (Pharaoh's party) to that place. And We saved Moses and all those with him. Then We drowned the others. Verily! In this is indeed a sign (or a proof), yet most of them are not believers. And verily, your Lord! He is truly the All-Mighty, the Most Merciful." Surah 26: 52.68
In another surah Almighty Allah narrated: And We took the children of Israel across the sea, and Pharaoh with his hosts followed them in oppression and enmity, till when drowning overtook him, he said: "I believe that La ilaha illa (Huwa): (none has the right to be worshiped but) He, in whom the children of Israel believe, and I am one of the Muslims (those who submit to Allah's Will)."
Now (you believe) while you refused to believe before and you were one of the Mufsideen (evil-doers, corrupts, etc.). So this day We shall deliver your (dead) body (out from the sea) that you may be a sign to those who come after you! And verily, many among mankind are heedless or our Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.). Surah 10: 90-92
The curtain fell on Pharaoh's tyranny, and the waves threw his corpse up on to the western seashore. The Egyptians saw him and knew that their gods whom they worshipped and obeyed were mere slaves who could not keep death away from their own necks.