According to Hindu legend, a pregnant woman named Rathnavathi was an ardent devotee of Shiva.
While nearing labor, she requested her mother to come over.
Her mom could not reach on account of heavy floods in river Cauvery.
As delivery time came closer, Rathnavathi prayed to Shiva.
Shiva, moved by the devotion of Rathnavathi, took the form of Rathnavathi's mother and helped with her smooth delivery.
After the delivery, Shiva vanished and Rathnavathi's mother arrived later.
The family came to know that it was Shiva who attended to the delivery.
Henceforth, Shiva in the temple came to be known as Thayumanaswamy, meaning the Lord who acted like a Mother.
The temple obtained the name from the presiding deity, Thayumanaswamy.
Shiva disguised himself as a mother for a pregnant lady, leading to the name Thayumanavar, meaning the one who became a mother.

According to Hindu mythology, the city Tiruchirappalli derives its name from legend associated with the Thayumanaswamy temple.
The three-headed demon Trishira, who meditated on Thayumanavar near the present-day city to obtain favours from the god.
An alternative derivation, not universally accepted, is that the source of the city's name is the Sanskrit word "Trishirapuram"—Trishira, meaning "three-headed", and palli or puram meaning "city".

As per another legend, due to a fight between Adisesha (serpent god) and Vayu (Wind god) to seek ownership of Himalayas, the three pieces of the mountain fell to three different places.
One of them was Trincomalee in Sri Lanka, Srikalahasti at Andhra Pradesh and Rockfort.
The place  came to be known as Trisikarapuram as there are three peaks in the temple, one each for Shiva, Parvathi and Ganesha.
According to Hindu legend, a pregnant woman named Rathnavathi was an ardent devotee of Shiva. While nearing labor, she requested her mother to come over. Her mom could not reach on account of heavy floods in river Cauvery. As delivery time came closer, Rathnavathi prayed to Shiva. Shiva, moved by the devotion of Rathnavathi, took the form of Rathnavathi's mother and helped with her smooth delivery. After the delivery, Shiva vanished and Rathnavathi's mother arrived later. The family came to know that it was Shiva who attended to the delivery. Henceforth, Shiva in the temple came to be known as Thayumanaswamy, meaning the Lord who acted like a Mother. The temple obtained the name from the presiding deity, Thayumanaswamy. Shiva disguised himself as a mother for a pregnant lady, leading to the name Thayumanavar, meaning the one who became a mother.
According to Hindu mythology, the city Tiruchirappalli derives its name from legend associated with the Thayumanaswamy temple. The three-headed demon Trishira, who meditated on Thayumanavar near the present-day city to obtain favours from the god. An alternative derivation, not universally accepted, is that the source of the city's name is the Sanskrit word "Trishirapuram"—Trishira, meaning "three-headed", and palli or puram meaning "city".
As per another legend, due to a fight between Adisesha (serpent god) and Vayu (Wind god) to seek ownership of Himalayas, the three pieces of the mountain fell to three different places. One of them was Trincomalee in Sri Lanka, Srikalahasti at Andhra Pradesh and Rockfort. The place  came to be known as Trisikarapuram as there are three peaks in the temple, one each for Shiva, Parvathi and Ganesha.
Thayumanaswami Temple, Rockfort