The Lord here presents Himself as Gurunatha Who taught the essence of Pranava to His Father, Shiva (‘Swami') and thus became Swaminatha. It is said that once, as a result of the curse laid on him by Bhrigumuni, Lord Shiva forgot the “Pranava Mantra”. He immediately sent for his son Subrahmanya and asked him if he knew the Mantra. The young Subrahmanya smilingly replied that he does and he asked Lord Shiva that if only the Lord is prepared to learn the Mantra in a proper manner, then he would teach Him. Thereupon. With folded hands and bowed head, Lord Shiva stood before his young Gure (Subrahmanya) with great veneration and learnt the Mantra. As this incident took place in this sacred place it came to be known as “Swamimalai” and the deity as Swaminatha, indicating that the son was superior to his Father.
It is in keeping with this legend that the shrine of Subrahmanaya is built on the hillock and that of Lord Shiva below the mound.