According to legends, more than 3500 years ago god Indra installed a small tower over a naturally formed stone lingam as a sign of devotion to Shiva. Other gods followed Indra’s lead and began to worship there. Soon a human devotee witnessed the miraculous scene of gods worshipping at the lingam and notified the local king, Kulashekhara Pandya, who built a temple at the site.
Story of Meenakshi
A Pandya king, Malayadhvaja, hoped for a son and heir. He performed a fire ceremony requesting that the gods fulfill this wish. Instead, he was granted a daughter, Meenakshi, who was born with three breasts. The gods told the king not to worry, but to raise Meenakshi as a brave warrior, just as he would a son, and that when she grew up and met her true love, her third breast would disappear. Meenakshi proved herself gifted in battle, conquering armies in all directions. When she sought to attack the north, however, she was confronted by the god Shiva, who resides in Mount Kailasha, deep in the Himalayas. Upon seeing him, one of her breasts fell off and the prophecy was realized. Lord Shiva was called Sundareshwar (a beautiful God)
Lord Vishnu presided over the wedding of Shiva and Meenakshi and did the Kanyadaan. This is depicted in a large sculpture with Vishnu, Shiva and Meenakshi together. The divine couple made their home in Madurai, where they ruled as queen and king.