As per Hindu legend, a cow used to milk at a specific place everyday which turned to ghee. When the people around tried to catch the cow, it disappeared. The villagers reported it to the ruling king, who dug up the place to find a Lingam, an iconic representation of Shiva in the place. He is believed to have built the temple. Since Nei (ghee) ablution was performed, the place came to be known as Neyyadiappar temple. As per the temple legend, a devotee of the temple worshiped the presiding deity by lighting ghee lamps. He picked up palak leaves from the temple. He prayed Shiva for better living as he was ageing, for which Shiva replied that he got return with the palak leaves that he was picking from the temple.