Matsya, the first-ever incarnation of Lord Vishnu existed way before the era of Rama and Krishna. The elaboration of the Matsya Avatar is found in most significant Puranas. In Hinduism, there is a separate scripture for the first incarnation, known as Matsya Purana. The Matsya avatar has been conceptualized into two dimensions. It is believed that the Matsya Avatar took place several times. The first authentic version of Matsya Purana describes the fish saviour from Swayambhuba Manavtara. At the end of Kalpa, the demon Hayagriva steals the four Vedas. Hayagriva was a horse-faced demon conceived by Sage Kashyapa and Danu, his legitimate wife. The efforts made by Kashyapa was for the welfare of humanity. Ironically, his son had the opposite intention. The ultimate aim of Hayagriva was to cut off humanity’s access to the Vedas. He knew the benefits of the Vedas that would reshape creation. Hayagriva wanted to be the king of the demon race. Therefore, his concern was only the welfare of demons. Lord Vishnu created the four Vedas and handed it over to Lord Brahma. Before revealing the four books of knowledge to the earth, Lord Brahma seek help from Lord Shiva. Hayagriva knew about Brahma’s visit to Lord Shiva at Kailash. He employed Madhu-Kaitabha to steal the Vedas from the grasp of Lord Brahma. After the successful attempt, they handed over the stolen Vedas to Hayagriva. As mentioned in the Srimad Bhagavad, Lord Vishnu is pledged to take an incarnation every time unrighteousness takes over righteousness. To teach the demon a lesson Lord Vishnu took the incarnation of a fish. He used his divine powers to bring a flood to defeat the demon king Hayagriva. Then, a war broke out between Hayagriva and Lord Vishnu where good took over evil. The Lord reclaimed the stolen Vedas and revealed it to the world. In other versions, Hayagriva was lord Vishnu who reclaimed the stolen Vedas from the demons.
The second Matsya avatar took place at the beginning of the first Satya Yuga of the 7th Manavtara. It was during the Sweta Varaha, or the present Kalpa. Vaivaswata was a generous king, the 7th and present Manu who was successful in pleasing Brahma, the creator. Due to his utmost devotion and austerities, he awarded Vaivaswata a chance to save all creation from a catastrophic flood. As days passed, the day of the global flood grew closer. At times, Vaivaswata encountered a small fish with horns that possessed divine powers. The fish was able to enlarge its physical size with time. Being a devotee, Vaivaswata recognized the fish to be an incarnation of Lord Vishnu. Then, Lord Vishnu revealed about the upcoming catastrophe to Vaivaswata in detail. After the revelation, he started collecting all types of living creatures and plant seeds for saving the line of creation. Seeing his efforts, the gods offered him a mighty ship that could withstand the flood. Days passed and the waters began to flood the earth. Vaivaswata tied the celestial serpent, Adishesha to the horn of the fish incarnation. Then, they head off to the mountains for shelter, and the conversation between the incarnation and Vaivaswata continues.