As per the Legends, Gunaseelar the disciple of Saint Sreethalpya served his Guru with such honesty that he was given with the superior knowledge of his guru. One day, Gunaseelar went on a pilgrimage to the Tirumala Hills and had darshan of Lord Venkateswara. He pleaded the Lord to come with him to his ashram as he could not be separated from Him anymore. The Lord moved by the devotion of Gunaseelar and told him that as he can't leave Tirumala as He is in a state of debt. Lord directed Gunaseelar to return to his Ashram and perform penance. The Lord told the saint that none other than Vaikuntavasa Sri Narayana would appear before him.
Gunaseelar did penance as directed by the Lord. After so many years, in the Krita Yuga Lord self-manifested in the ashram of Gunaseelar. Gunaseelar was excited and spent his days performing puja. During this time, his guru Sreethalpya wants to perform penance in Badrinath. He asked his disciple to accompany and stay with Him. Gunaseelar was in a dilemma, wheater to go with his guru or to stay with Lord.
The ever kind Narayana was so moved at seeing the condition of his devotee and told him to serve his guru. Gunaseelar left the place after appointing a young boy to take care of the deity. Unfortunately, the boy grew fearful of the wild animals and the swirling waters of the Cauvery, He ran away. As the time passes by, an anthill grew over the deity.
Many years later, king Gnana Varman who was ruling this region, established his cowshed near to Gunaseelam. One day the cowherds noticed that the level of milk in the milk cans had gone down mysteriously. The puzzled cowherds reported this to the king and he came to see the mysterious disappearance of the milk. At that point, an old Brahmin appeared and told the king that if the anthill was dissolved with milk, the king could see the Lord himself. The anthill was dissolved with milk and the Idol of Venkatachalapathy with a Conch, discus, whip and sceptre was revealed.