Matsya meaning fish was the first Avatar of Vishnu. According to the Matsya Purana, the legend goes like this. In the beginning of Satya Yuga, world was destined to be ruined by massive floods. Lord Vishnu decided to save mankind from this calamity. He transformed into a fish or Matsya and entered the river on earth.
Along the banks of this river, a king named Manu was collecting water from the river. He caught the fish into his vessel and when he was on his way to throw the fish back to the water, the fish implored him not to throw it back into the river. The king took pity on the fish and decided to keep it in his vessel. The next day, he was surprised to see that the fish had grown huge. The fish continued to grow progressively. Finally, the fish grew up to the size that only the ocean could hold it.
The King realized that the fish is a divine being. The fish exposed itself to be Lord Vishnu and whispered to the king about the upcoming floods. He told him that the floods would submerge the whole world, destroying all the living beings. And only King Manu can preserve the humanity into the new world.
The fish commanded him to build a great ship and fill it with valuable people, plants and animals of every species. The king embarked on to make preparation to survive the flood. When the floods came, the King, along with the chosen people, animal and plants were safe inside the ship. He steered the ship in the storm but all in vain. Then, Lord Vishnu, as the Matsya, steadied the ship from behind for seven days and seven nights. Manu and his followers were saved and began to create the new world.