According to the version in the Matsyapurāṇa, the God Brahmā created the Brahmāṇḍa, cosmic egg. Viṣṇu broke it and the upper portion became the sky, the lower portion the earth and the netherworlds. The earth was suffering from the heavy weight of oceans and mountains.
The goddess Earth prayed to Viṣṇu to lighten her load. In order to lessen her burden and at the same time to enjoy her company Viṣṇu took the form of an aquatic Boar and plunged into the sea to play with the Goddess Earth.
At that time came Hiraṇyākṣa, sure of his power and with an ardent desire to fight invited Viṣṇu for a combat. Viṣṇu kept the earth on the surface of the ocean and without any effort hurled his discus and put an end to the life of the demon.