Prophet Yunus (as) was chosen by ALLAH SWT for prophethood to guide the people of Nineveh to the truth and spread the message of ALLAH SWT. He was an ordinary man among the people of Nineveh and he spent a long time in Nineveh trying hard to invite people towards the path of truth, believing in ALLAH SWT, and abandon idol worship. People of Nineveh had been practicing injustice and were idolaters and disbelievers. There is a full chapter in Quran dedicated to Prophet Yunus (as). ALLAH SWT mentions in Quran Have the people been amazed that We revealed [revelation] to a man from among them, [saying], “Warn mankind and give good tidings to those who believe that they will have a [firm] precedence of honor with their Lord”? [But] the disbelievers say, “Indeed, this is an obvious magician.”(Al-Quran10:2)
Despite all the struggles in convincing the people of Nineveh to leave their disbelieve, foolishness and idolatry, people disbelieved and denied to follow what Prophet Yunus(as) said and argued, saying “ we and our forefathers have been worshiping these idols since ages and we have faced no harm”. Prophet Yunus (as) tried his best to fulfill the commandments of ALLAH SWT and continually reminded them of the severe wrath of ALLAH SWT to ad-Thamud and the people of Nuh(as), but people rejected him and said that they are not scared of such intimidations. When Yunus(as) found the people of Nineveh to be disobedient and unreceptive of the message of ALLAH AWT, it made him downhearted and so he thought to give up on his people. Yunus(as) left the city of Nineveh without the permission of ALLAH SWT.
Just as soon as Prophet Yunus(as) left the city, the color of the sky began to change and turned red like fire. It frightened the people of Nineveh and soon they remembered the wrath befallen upon the people before them. And they understood that Prophet Yunus(as) was right and they all gathered on the mountains and felt on their knees and ask ALLAH SWT for his mercy and forgiveness. Hearing their cries and repentance the mountains echoed and ALLAH SWT the most forgiving and most merciful granted them forgiveness. The wrath was removed and ALLAH SWT lifted the punishment, the skies cleared and became calm and the people of Nineveh were blessed. They prayed for the Yunus(as) and wished he would return to them.
Meanwhile, Prophet Yunus(as) boarded a small ship accompanying other passengers. He traveled in the ship all day sailing the calm sea and cool breeze blowing on his face. He felt peaceful being away from the disobedient people of Nineveh. As soon as night arrived, the sear became fierce and a wild storm shook the ship so hard as it is going to split the ship into pieces. This tempest made the passengers fearful of losing their lives. The ship captain told the passengers to throw their luggage into the sea to make it lighter. Everyone did as directed but it made no difference and the ship continued shaking and sinking as it was still heavy.
So the captain decided to sacrifice the life of one person to save others and that person will have to jump into the sea. To decide who will jump, they draw lots. Prophet Yunus(as) name got selected, however, no one agreed to throw him as they knew that Prophet Yunus(as) in a noble and righteous man. So they draw lots again. They did so three times and every time Prophet Yunus(as’s) name appeared. Prophet Yunus(as) realized that it’s the will of ALLAH SWT and he jumped off the ship himself. Following the commands of ALLAH SWT, a huge whale swallowed up Prophet Yunus(as) as soon as he jumped into the sea.
ALLAH SWT made Prophet Yunus(as) survive inside the whale’s stomach for several days. In the deep darkness inside the whale, Prophet Yunus(as) realized his mistake of leaving the ALLAH SWT’s command incomplete. He repented and asked for forgiveness from ALLAH SWT. He prayed to ALLAH SWT sincerely and prostrated inside the whale’s womb and recited this dua: La ilaha illa Anta (none has the right to be worshipped but You (O Allah), Glorified (and Exalted) be You (above all that evil they associate with You), Truly, I have been of the wrongdoers.” (Al-Quran 21:87 ).
Prophet Yunus(as) so much inside the whale, that all the creatures of the sea heard his repentance and prayers and gathered and praised ALLAH SWT’s glory.
ALLAH SWT accepted the prayers of Prophet Yunus(as) and granted him forgiveness. The whale spits the Prophet Yunus(as) at the seashore as commanded by ALLAH SWT. he became very sick and inflamed being inside the whales’ womb for many days so ALLAH SWT provided him food from a fig tree and returned him into great health. Indeed ALLAH SWT is the most merciful and forgiving and loves his believers who repent sincerely for their wrongdoings and ignorance.
When Prophet Yunus(as) recovered completely, he returned to Nineveh to complete his left mission, however when he arrived there, and witnessed that the people of Nineveh had embraced Islam and were eagerly waiting for him. Seeing this, Prophet Yunus(as) prostrated to ALLAH SWT to thank ALLAH SWT for all his favors.
Almighty ALLAH SWT mentions in Quran:
And, verily, Jonah was one of the Messengers. When he ran to the laden ship, he agreed to cast lots and he was among the losers, Then a big fish swallowed him and he had done an act worthy of blame. Had he not been of them who glorify Allah, he would have indeed remained inside its belly (the fish) till the Day of Resurrection. But We cast him forth on the naked shore while he was sick and We caused a plant of gourd to grow over him. And We sent him to a hundred thousand people or even more, and they believed, so We gave them enjoyment for a while. (Ch 37:139-148 Quran).