When the Devas won the nectar from the Asuras, they began drinking it without paying due respect to Lord Ganesha. This infuriated him and he took away the pot of nectar. When he was passing through this place a drop of nectar fell and got manifested as a Swayambhu Linga.
Realising their mistake, Indra and the other Devas asked Ganesha to forgive them who in turn returned the pot of nectar and told the Devas to worship Lord Shiva here as AmrithaKadeshwarar.
Aditi the mother of Devas came here to worship Lord Shiva every day. So, Indra decided to turn the temple into a chariot and have it pulled to Devaloka, the abode of Devas so that his mother did not have to visit this place to worship Shiva every day. Lord Ganesha having noticed this pressed the chariot with his leg and as a consequence one of the wheels sank and got stuck into the ground. Indra then prayed to Ganesha and requested to allow him to move the temple to Devaloka.
Sunken wheel of Chariot, Amrithakadeswarar temple Melakadambur
Ganesha agreed to let the temple go if Indra installed a crore lingas. However, when Indra tried installing the lingas every piece got damaged and finally Indra went back to Shiva, his pride broken, and requested him for help. Shiva in the form of Lord Amrithakadeswarar then asked Indra to install one linga by chanting his name a thousand times. Accordingly, when Indra completed the penance, Lord Shiva appeared before him and told him that he wished to stay in the same place and worship Amrithakadeswarar on behalf of Aditi, Indra's mother. It is believed that Indra visits the temple every day to worship Lord Shiva in the form of Amrithakadeswarar.
The temple has been well preserved and the chariot with one of its wheels stuck in the ground can be seen to this day.