When Lord Sri Rama returned to Ayodhya after rescuing Mother Sita from the captivity of Ravana, Sri Sugriva, Sri Hanuman and Sri Vibishana accompanied the Lord to participate in the coronation function of the Lord. While returning back with the gift of Sri Ranganatha idol from Sri Rama, Vibishana came south. Seeing the beauty of River Cauvery and the scenic environment, he wanted to relax for a while. Lord Vinayaka was there in the guise of a little boy. Vibishana asked the boy to take care of the gift idol of Lord Ranganatha. After waiting for Vibishana, the boy placed the idol on the ground and hid Himself in the hill.
Vibhishana was shocked to see the boy missing. He applied all his energy to move the idol but failed. Thus Lord Ranganatha, bound to Sri Lanka, cut short His journey and chose Sri Rangam as His abode. Seeing the boy at the top of hill, Vibishana hit Him on the head, the scar of which is still visible on the Vinayaka idol. Thus, Lord Vinayaka along with Lord Ranganatha nearby is ruling us gracefully.
A furious contest arose between Adisesha and Vayu to decide the supremacy of their prowess. The condition was to shake violently Mount Kailash. Defeating Adisesha, when Vayu broke the mount, a part of it fell in this place. Demon Tirishira (demon with three heads) was on penance on Lord Shiva. Though many years passed, Lord Shiva delayed His darshan to test his purity.
He threw two of his heads in fire and was about to throw the third, Lord appeared before him and restored his two heads. As requested by him, Lord Shiva agreed to stay here in the name of Thirisira Nathar (based on demon Tirishira story). The place came to be known as Tirishiramalai, now changed as Tiruchy.