According to Mahabharata, the fish gave him orders.
'O adorable being, thou hast protected me with special care; do thou now listen to me as to what thou shouldst do in the fulness of time! O fortunate and worshipful sir, the dissolution of all this mobile and immobile world is nigh at hand. The time for the purging of this world is now ripe. Therefore do I now explain what is good for thee! The mobile and immobile divisions of the creation, those that have the power of locomotion, and those that have it not, of all these the terrible doom hath now approached. Thou shall build a strong massive ark and have it furnished with a long rope. On that must thou ascend, O great Muni, with the seven Rishis and take with thee all the different seeds which were enumerated by regenerate Brahmanas in days of yore, and separately and carefully must thou preserve them therein. And whilst there, O beloved of the Munis, thou shall wait for me, and I shall appear to thee like a horned animal, and thus, O ascetic, shall thou recognise me! And I shall now depart, and thou shall act according to my instructions, for, without my assistance, thou canst not save thyself from that fearful flood.'
Manu then thought of the fish
And Manu then, O great and powerful king and conqueror of thy enemies, procured all the different seeds as directed by the fish, and set sail in an excellent vessel on the surging sea. And then, O lord of the earth, he bethought himself of that fish. And the fish too, O conqueror of thy enemies and foremost scion of Bharata's race, knowing his mind, appeared there with horns on his head. And then, O tiger among men, beholding in the ocean that horned fish emerging like a rock in the form of which he had been before appraised, he lowered the ropy noose on its head. And fastened by the noose, the fish, O king and conqueror of hostile cities, towed the ark with great force through the salt waters. And it conveyed them in that vessel on the roaring and billow beaten sea. And, O conqueror of thy enemies and hostile cities, tossed by the tempest on the great ocean, the vessel reeled about like a drunken harlot. And neither land nor the four cardinal points of the compass, could be distinguished.
How were the surroundings?
And there was water everywhere and the waters covered the heaven and the firmament also. And, O bull of Bharata's race, when the world was thus flooded, none but Manu, the seven Rishis and the fish could be seen.
Where did Manu take those Saptarshis to?
And, O king, the fish diligently dragged the boat through the flood for many a long year and then, O descendant of Kuru and ornament of Bharata's race, it towed the vessel towards the highest peak of the Himavat. And, O Bharata, the fish then told those on the vessel to tie it to the peak of the Himavat. And hearing the words of the fish they immediately tied the boat on that peak of the mountain and, O son of Kunti and ornament of Bharata's race, know that that high peak of the Himavat is still called by the name of Naubandhana (the harbour).