Madurai city was not a one that came up naturally. It was a city built up by some one. It was built up by Aazhavai Azhagar also called Chokkanathar. Once upon a time it was a forest only with lots of Kadambavana trees. In that forest lot of water falls were there. It was infested by wild animals. The sanctum sanctorum of Chokkanathar built by Lord Indra was supported by eight elephants called Ashtathik kajangal. Only this sanctum sanctorum was inside the forest. A merchant by name Dhanjeyan was living in Pandyan kingdom. He was an ardent devotee of Lord Shiva. He felt immensely happy in the service of devotees of Lord Shiva and was very courteous with them. Since he was a business man he was a very rich person also. Once after completing his business he was returning back to his home through the kadambavana forest. Suddenly the sky became very dark. The visibility became very poor as it was pitch dark. The route was not visible. Dhanjeyan stood standstill. He does not know what to do. At that time suddenly light appeared because of a lightning. Dhanjeyan went towards the direction where the light appeared. There he saw the temple tower of Lord Chokkanathar.
Dhanjajeyan got confused as to how this temple came here and who built it. How does he will know that this temple was built by Lord Indra. In the water pond lots of lotus flowers were there. He was surprised to know that those flowers were of gold . Is it because of these golden flowers shedding light that this place is very bright ? He worshipped Chokkanathar with intense devotion(Bhakthi). Suddenly he heard the sound of musical instruments. Astonished and with shock, he turned towards the direction from where the sound came. Lots of people wearing silk dresses and wearing head gears were coming to the temple carrying pooja materials. They started performing poojas to Lord Chokkanathar. Only then he came to know that they were celestials. He felt happy because he had an opportunity to see the celestials. And even in that he had an opportunity of witnessing there pooja. His body experienced horripilation (Chilirththal in tamil) because of emotion. Some celestials went inside the tank and started plucking those gold lotus flowers. Without knowing what he is doing he also went inside the tank and helped the celestials in plucking flowers. They praised him for this act of his. After the poojas were over the celestials left that place. He informed the same to the king Kulasekara Pandiyan.He further told the king “ You should also witness that pooja. I saw that pooja on a Mondy. You should visit that place on the coming Monday”. The king felt immensely happy. That night he did not get sleep. In the early morning sleep he had a dream. In that dream Chokkanathar appeared before him and ordered“ Kulasekara? What Dhanjeyan saw was true. You develop a city by reforming and developing the forest. With the temple at the centre the city should come up. Streets, houses, palaces, should come up”.The king who got up with astonishment and shock from his sleep immediately went inside the forest accompanied by ministers, soldiers while Dhanjeyan who also accompanied them to show them the route inside the forest. There Lord Chokkanathar was seen in a temple supported by eight elephants.All of them worshipped Chokkanathar. Immediately Vigneswara pooja was performed. The king started the construction of city. King built the hall before the sanctum sanctorum(Arththa mandapam in tamil), festival hall, Mandapam for performing homams(Yaagams), Kitchen etc., Then he built around the temple, houses, bungalows and streets. The city wore a nice look.Kumbabishekam for the temple was performed immediately there after. Lord Shiva who established himself in the temple, tok one ray of the moon from his matted hair and spilled it in the city. Because the city shone brilliantly. Planet Chandran (Moon) is the lord for mind. So the people of Madurai got more will power. If you look at the Moon you may feel cool and sweet. Sweeet is also called Maduram. Kulasekara pandiyn named the city as Madurai since the sweetness(of Moon) is spilled there. He ruled the country then for many number of years.