The very first avatara in Hindu literature the Matsya Avatara epitomizes all the various incarnations of God that follow. Preserving all life forms in a boat during the deluge, the incarnation establishes the concept of Manus for each Great Yuga coupled with the task of recovering the lost Vedas.
The Shrimad Bhagavatam narrates that Brahma's day was about to get over. All creation is dissolved except the Vedas lodged safely inside Brahma's body as he slumbers and are given back to the universe in the next Cycle of Creation. Brahma yawned and the Vedas flowed out of his lips during this moment of respite. A cunning demon named Hayagriva observing the process of dissolution, resolved to become eternal by all means. Spotting this opportune moment, he virtually swallowed the Vedas.
Becoming immortal, Hayagriva was freed from the endless cycle of birth and death! The incidence violated the cosmic order because every being which is born must die and the asura would not release the Vedas into the next Cycle of Creation.
Vishnu, regarded as the preserver of the world during each period of its existence, was watching this scenario. Since Pralaya or dissolution was to follow soon the Vedas would be lost for the next spell of creation unless they were retrieved. Hayagriva lurking in the depths of the cosmic ocean was smugly complacent that he would be difficult to spot while the universe came to an end. Vishnu dedicated to keeping the balance between creation and destruction; decided that this avatara must identify the Manu for the next Cycle of Creation or Kalpa. (the period of a day of Brahma). (Manu is a progenitor of the world and its inhabitants, seen as a son of or personification of Brahma, fourteen Manus preside in succession over the universe in each kalpa) Vishnu chose a great and pious king named Satyavrata to become the next Manu.
When Satyavrata was praying, waist deep in flowing water, he scooped water from the river and found a tiny fish inside. As he was about to put it back in the river the fish asked for his protection from the larger fish. Soon enough the king put the fish into his urn but it grew bigger overnight. A bigger vessel became its container, then a pond nearby, followed by a lake and the widest river soon after but the fish continued to expand in size. The stressed king finally led it to the ocean where he became aware that it was Vishnu Incarnate himself playing this prank on him. Because of his good karma and consistently helping Vishnu, Satyavrata deserved to become the next Manu.
Vishnu told his devotee that the universe was about to be dissolved and all life would perish in seven days time. He instructed Satyavrata to build a giant ark, fill it up with the seeds, animals and plants required for the next spell of creation, get into the boat and wait for him at the appointed time. Vasuki, the king of serpents and the Saptarishis, seven eternal sages, were to accompany him.
The colossal fish arrived at the spot glowing with a golden light; the downpour leading to torrential water that would wash away the fatigued old creation. Vishnu towed the boat tied to a horn manifested on his head, using Vasuki as a rope for the turbulent night, equivalent to one cycle of creation. He hunted the oceans for Hayagriva, the Veda stealer. The demon was found and a terrifying combat ensued, with the fiend being finally torn apart.
During the deluge that night the Matsya Avatar kept the boat afloat and narrated the contents recorded in the Matsya Purana to Satyavrata preparing him for his role as the next Manu. The liberated Vedas were restored to Brahma so that he could resume the function of creation at the proper time. Consequently Lord Vishnu saved his true devotees from dissolution in the Matsya incarnation.