Demon Adi was the son of Andhaka. It was Shiva who had put
an end to the tyranny of Andhaka by killing the demon. To avenge his father’s
death, Adi offered prayers to Brahma. He performed intense austerities and did
penance to please Brahma. Finally, Brahma relented and gave him the boon that
he will only die if left his present form and took another form.
Demon Adi after receiving the boon thought of plans to enter
Kailasa, the abode of Shiva. He did not want to fight the Shiva Ganas and alert
Shiva about his presence.
He also knew that he did not have the power to overcome
Virabhadra, the main Shiva Gana.
To avoid being sighted, Adi was forced to take the form of
snake to slip into Kailasa without the Ganas noticing.
Then Adi took the form of Goddess Parvati and went near
Shiva. But Shiva immediately realized the demon in disguise and overpowered and
killed him.
This story is mentioned in the Padma Purana and Matsya
Purana.