Madurai origin and name emerge form the myths of a lovely legend. In a forest near a lotus pond, Indra, King of Gods, worshipped Lord Siva as a Swayambu Lingam. At this hallowed spot, the Pandiyan monarch "Kulasekhara" built a great temple and by clearing the forest, he created a lotus-shaped city around the temple. On the day the city was to be named, Lord Siva appeared at the ceremony. As he blessed the land and its people, divine nectar was showered on the city form his matted locks. The city was henceforth known as Madhurapuri. Madhurapuri grew and prospered to become the capital of the Pandiyan Kingdom. It is referred to in the Ramayana and in Kautilya's Arthashastra.
Foreign travelers of ancient period also had heard of it. Megasthenes (302 BC), Pliny (77 AD) and Ptolemy (140 AD) wrote references on Madurai. Marco Polo visited Madurai in 1293 AD and lbn Batuta, another Travel writer in 1333 AD.