The Legend of Lord Ganesha, Skanda and Vallinayaki is related to the marriage of Lord Skanda (Lord Kartikeya) and Vallinayaki. Lord Ganesha, also known as Vinayaka and Ganapati, is one of the most cherished Hindu Gods, who is worshipped by Hindus, Buddhists and Jains through out the world. The elephant headed deity is considered as the deity of new ventures and wisdom and is also regarded as the Lord of Beginnings, Destroyer of Pride and Vanity and the Remover of Obstacles. The legend mentions that once there was a tribal ruler named Nambirajan. He served as king of the Kuravas of the hill tribes in the ghat region of Tamil Nadu. Nambirajan was a devotee of Lord Shiva and prayed to the lord for a daughter. Shiva was pleased by his worship and told Nambirajan that he would discover a girl child in the nearby forest and that child will become his daughter. The tribal ruler followed the Lord`s instructions and accordingly found a child in the forest. He named her Vallinayaki and raised her as his own daughter.
Eventually Vallinayaki grew up and became an attractive lady. Skanda, the son of Lord Shiva, became amused by her beauty and wanted to marry Vallinayaki. Kartikeya took the appearance of an old bangle seller and tried to sell bangles to the daughter of Nambirajan. Thus a conversation began between Skanda and Vallinayaki. But they were interrupted by the brothers Vallinayaki, who were very protective of their sister.
Lord Skanda became disturbed and baffled by their unexpected intrusion. But the deity was unwilling to initiate a war. Thus after some time, he took the disguise of Vengai Margam, who was a former tribal ruler. But her brothers intruded Skanda and Vallinayaki this time as well. Later the son of Lord Shiva took the appearance of an old ascetic from the Himalayan mountain range; and returned to his divine abode in Mount Kailash. Then Skanda or Lord Kartikeya reported to his elder brother, Lord Ganesha, about the obstructions created by the brothers of Vallinayaki. Skanda prayed to Ganesha, the remover of obstacles, for his help.
Afterwards, Lord Ganesha, the elder son of Lord Shiva and Goddess Parvati, took the appearance of a wild elephant and approached Vallinayaki, while she was walking in the garden. Vallinayaki became much scared and went to Skanda, who was present nearby, and embraced him. She requested him to help and protect her from the mad elephant and promised to give him anything that he desired from her. Then Skanda saved her from the elephant, which eventually went away. Then he asked Vallinayaki to marry him and requested her to keep her promise.
Vallinayaki realized that he was Lord Kartikeya (Murugan) and gladly accepted his proposal for marriage. The divine marriage of the deity was organized with magnificence by the tribal king Nambirajan and was celebrated by all his devotees. In this way Lord Ganesha helped his brother Skanda in his marriage with Vallinayaki.