Srimad Bhagvata Mahapurana: Book 8: Chapter 24: Verses 1-16
The story of the descent of the divine Fish recounted
The king (Pariksit) submitted : O divine sage, I (now) wish to hear (from your lips) the story of the (very) first descent of Sri Hari--whose exploits are marvellous (indeed)--in which He appeared and behaved as a fish by His wonderful creative energy. Be pleased to tell us precisely the reason why, like one subject to (the wheel of) Karma, the almighty Lord assumed the form of a fish-(so) detested in the world, because of its being (predominantly) Tamasika by nature and (therefore so) fierce(lit., difficult to resist)-and everything connected with that descent, O venerable sage. (For) the stories of Lord Visnu of excellent renown are conducive to the happiness of the worlds. Suta resumed : Requested thus by Pariksit (protege of Lord Visnu manifested in the form of Sri Krsna)the all- knowing sage Suka (the son of Vedavyasa, nicknamed Badarayana, so-called because he has his abode in a grove of jujube trees) recounted (as follows) the deeds of Lord Visnu, performed by Him as manifested in the form of a fish. Sri Suka resumed : The almighty Lord actually assumes (various) forms (only) when seeking the protection of cows, the Brahmanas, the gods and the righteous and the Vedas too, as well as of righteousness and whatever (else) is worth seeking (in the world). (Though) functioning in (all) creatures, high and low, (as their Inner Controller), the Lord, like the air, does not acquire a high or low status occasioned by the modes of Prakrti, because of His being devoid of the (three) Gunas.
At the end of the previous Kalpa (covering a day of Brahma or a thousand revolutions of the four Yugas) there came about an occasional dissolution of the universe consequent on Brahma's retiring to bed (at the end of the day's work). At that time (all) the (three) worlds including the earth were washed away by the ocean, O protector of men I The powerful (demon) Hayagriva (so-called because of his having the head of a horse), who was near by, stole away (by dint of Yoga or concentration of mind) the Vedas, which (while being unconsciously repeated by him) had (automatically) escaped (as usual) from the mouths of Brahma (the creator), who was inclined to go to bed, overcome as he was by sleep under the influence of time (the close of the day). Perceiving that action of Hayagriva, the Danava chief, the almighty Lord Sri Hari assumed the form of a fish.
In that (very) Kalpa (the Kalpa that had just ended) there was a certain royal sage, Satyavrata by name, an exalted soul devoted to Lord Narayana. He was practising austerities, subsisting on water (alone). That very king who was called Satyavrata (in the previous Kalpa) was known as Sraddhadeva, son of Vivaswan (the sun-god) in the present Kalpa and was exalted to the position of Manu by Sri Hari. One day an unknown fish appeared in the water held in the hollow of the palms of Satyavrata, who was offering handfuls of water (to the manes) on the bank of the Krtamala river (in South India). Satyavrata, who ruled over the Dravida territory, proceeded to drop along with the water the fish (as well) contained in the hollow of his palms into the water of the river, O scion of Bharata! The fish most pitifully said to that monarch, highly compassionate as he was, "Wherefore do you throw me in the water of this river, O king who are so kind to the afflicted, helpless as I am and afraid (too) of aquatic creatures that kill their own species? Not knowing the Lord, who had lovingly assumed the form of a fish in order to shower His grace on himself, Satyavrata made up his mind to protect the fish. On hearing the very pitiful appeal of the fish, the said merciful king (lit., the ruler of the earth) put it in the water of the vessel (he had brought with him) and took it to his hermitage.