Yunus
This story is mentioned here, and in Surah As-Saffat and Surah Nun.
Yunus bin Matta, upon him be peace, was sent by Allah to the people of Nineveh, which was a town in the area of Mawsil (in northern Iraq). He called them to Allah, but they rejected him and persisted in their disbelief. So he left them in anger, threatening them with punishment after three (days).
When they realized that he was telling the truth and that a Prophet never lies, they went out to the desert with their children and cattle and flocks. They separated the mothers from their children, then they beseeched Allah and pleaded to Him, with the camels and their young groaning, the cows and their calves mooing, and the sheep and their lambs bleating, so Allah spared them from the punishment.
Allah says;
فَلَوْلَا كَانَتْ قَرْيَةٌ ءَامَنَتْ فَنَفَعَهَأ إِيمَانُهَا إِلاَّ قَوْمَ يُونُسَ لَمَّأ ءَامَنُواْ كَشَفْنَا عَنْهُمْ عَذَابَ الخِزْىِ فِى الْحَيَوةَ الدُّنْيَا وَمَتَّعْنَاهُمْ إِلَى حِينٍ
Was there any town that believed (after seeing the punishment), and its faith saved it Except the people of Yunus;
when they believed, We removed from them the torment of disgrace in the life of the world, and permitted them to enjoy for a while. (10;98)
Yunus, meanwhile, went and traveled with some people on a ship, which was tossed about on the sea. The people were afraid that they would drown, so they cast lots to choose a man whom they would throw overboard.
The lot fell to Yunus, but they refused to throw him overboard. This happened a second and a third time.
Allah says;
فَسَـهَمَ فَكَانَ مِنَ الْمُدْحَضِينَ
Then he (agreed to) cast lots, and he was among the losers. (37;141)
meaning, the draw went against him, so Yunus stood up, removed his garment and cast himself into the sea.
Then Allah sent from the Green Sea -- according to what Ibn Mas`ud said -- a large fish which cleaved the oceans until it came and swallowed Yunus when he threw himself into the sea.
Allah inspired that large fish not to devour his flesh or break his bones, (as if He said) Yunus is not food for you, rather your belly is a prison for him.
وَذَا النُّونِ
إِذ ذَّهَبَ مُغَاضِبًا
And (remember) Dhun-Nun,
Here Nun refers to the fish; it is correct for it to be attributed to him here.
when he went off in anger,
Ad-Dahhak said;
"Anger towards his people."
فَظَنَّ أَن لَّن نَّقْدِرَ عَلَيْهِ
and imagined that We shall not punish him!
meaning, constrict him in the belly of the fish.
Something similar to this was reported from Ibn Abbas, Mujahid, Ad-Dahhak and others.
This was the view favored by Ibn Jarir, and he quoted as evidence for that the Ayah;
وَمَن قُدِرَ عَلَيْهِ رِزْقُهُ فَلْيُنفِقْ مِمَّأ ءَاتَاهُ اللَّهُ لَا يُكَلِّفُ اللَّهُ نَفْساً إِلاَّ مَأ ءَاتَاهَا سَيَجْعَلُ اللَّهُ بَعْدَ عُسْرٍ يُسْراً
and the man whose resources are restricted, let him spend according to what Allah has given him. Allah puts no burden on any person beyond what He has given him. Allah will grant after hardship, ease. (65;7)
فَنَادَى فِي الظُّلُمَاتِ أَن لاَّ إِلَهَ إِلاَّ أَنتَ سُبْحَانَكَ إِنِّي كُنتُ مِنَ الظَّالِمِينَ
But he cried through the depths of darkness (saying);"There is no God but You, Glorified be You! Truly, I have been of the wrongdoers."
Ibn Mas`ud said regarding the `depths of darkness';
"The darkness of the belly of the fish, the darkness of the sea and the darkness of the night."
This was also narrated from Ibn Abbas, `Amr bin Maymun, Sa`id bin Jubayr, Muhammad bin Ka`b, Ad-Dahhak, Al-Hasan and Qatadah.
Salim bin Abu Al-Ja`d said;
"The darkness of the fish in the belly of another fish in the darkness of the sea."
Ibn Mas`ud, Ibn Abbas and others said;
"This was because the fish took him through the sea, cleaving it until it reached the bottom of the sea. Yunus heard the rocks at the bottom of the sea uttering glorification of Allah, at which point he said;
لااَّ إِلَـهَ إِلااَّ أَنتَ سُبْحَـنَكَ إِنِّى كُنتُ مِنَ الظَّـلِمِينَ
There is no God but You, Glorified be You! Truly, I have been of the wrongdoers.
`Awf Al-A`rabi said;
"When Yunus found himself in the belly of the fish, he thought that he had died. Then he moved his legs. When he moved his legs, he prostrated where he was, then he called out;`O Lord, I have taken a place of worship to You in a place which no other person has reached."'