Kapaleeshwarar temple was constructed in the 7th century CE by the Pallavas. The Kapaleeshwarar Temple was first constructed where Santhome Church is presently located in Chennai. This temple was destroyed by the Portuguese and the present temple was constructed in the 16th century by the Vijayanagar Kings.
There is a religious story behind the name 'Mylapore' as indicated by the Puranas, the celestial Shakti offered her dedication to Lord Shiva in the form of a peacock. In Tamil, the peacock is called as 'mayil'. Consequently, the territory encompassing the temple was created with the name Mylai.
The story behind the temple is fascinating. Once, Brahma did not pay his regards to Shiva and Parvathi in Mount Kailash when he saw them.
This infuriated Lord Shiva, and he cut of one of Brahmas head to teach him a lesson. Brahma apologized for his behaviour and came to Mylapore. He introduced a Shiva lingam and started doing poojas that satisfied Lord Shiva. The head Shiva took away from Brahma was Kapalam and as Brahma introduced a Shiva lingam as a penance for his transgressions, the Shiva Lingam came to be known as Kapaleeswarar.