There are many stories associated with Shivaratri and its origins. One such legend concerns Lord Shiva and his divine consort, Devi Parvati. After creation was complete, Parvati once asked Lord Shiva which day did he like the most. The Lord replied that the 13th night of the new moon, during the month of Maagha, is his most favourite day. Parvati told this to her friends, from whom the word spread over all creation. Hence, Maha Shivasratri is observed on the 13th day of Maagha.
According to another legend, Maha Shivratri commemorates the day on which Lord Shiva indulged in "Tandava". In Indian philosophy, the almighty god is observed in three roles, each of which is assigned a different identity. Lord Shiva is regarded primarily as the destroyer god, as opposed to Lord Brahma(the creator of the universe) and Lord Vishnu(the preserver of the universe) - the other gods of the holy Hindu trinity. The "Tandava" is described as the dance of primordial creation, preservation and destruction. The Maha Shivratri day is said to mark a similar occassion long back in time when Lord Shiva indulged in the destructive dance Rudra Tandava that destroyed much of the universe.
The Rudra Tandava depicts the vigorous energy of Lord Shiva and catches the violent mood of the otherwise calm divinity.
Another fascinating legend links Lord Shiva with the "Pralay". Pralay, in Hindu mythology, means the day when 'shrishti'(creation) and 'Brahmaand' (the Cosmos) is destroyed by the fury of Nature. It is said that the whole world was facing destruction at one point and Goddess Parvati prayed to her husband Lord Shiva that he save the Jivas (living souls), remaining in space, during the long period of pralaya. She also desired that the Lord bless them to be active again, if they worshiped him just as she did then. Her prayer was granted. Parvati named the night of her wish-fulfilment as Maha-Sivaratri, or the great night of Shiva, and ordered mortals to observe this night as a time to worship Lord Shiva.
The legend of King Chitrabhanu is held to be a main reason of the origin of the fasting tradition during Maha Shivaratri festival. The story can be found in the Shanti Parva (chapter) of the Hindu epic Mahabharata where the old Bhishma, whilst resting on the bed of arrows and discoursing on Dharma (righteousness), refers to the observance of Maha Shivaratri by King Chitrabhanu. The story tells how the mighty ancient ruler Chitra Bhanu of the Ikshvaku dynasty, king of the whole of Jambu-Dwipa (ancient name for India), was once observing a fast with his wife when the renowned sage Ashtavakra came on a visit to his court with some pupils in tow. Finding the king fasting, Ashtavakra asked him the reason. King Chitrabhanu explained that he had a gift of remembering the incidents of his past birth, and in his earlier life he had been Suswara, a hunter in Varanasi. His only livelihood was to kill and sell birds and animals. One day, when out searching for a game, he shot a deer, but was overtaken by darkness and climbed into a bel tree for safety. Thinking that his wife and children were without food and waiting anxiously for his return, he began to cry bitterly. To his utter dismay, he also found his canteen leaking water. The water, together with bel leaves from the tree, fell onto a Shiva-linga (a symbol for the worship of Lord Shiva) placed at the foot of the tree. The next morning he sold the deer and bought food for his family. As he and his family was sitting down to have their food, a stranger arrived to his doorstep requesting for food. True to the ancient custom of Hindu hospitality, Suswara served the food first to the guest and then had his own. He lived for many years without learning that he had by chance fasted on the day of Shiva-Ratri, but when the hour of death drew near two messengers from Lord Shiva appeared to conduct his soul to paradise. It was then that he learnt that he was being rewarded for having observed the fast on that auspiscious day and night. The messengers told him that the leaves he had dropped by chance on the Lingam, was in imitation of its ritual worship. Also, the water from his leaky canteen had washed the Lingam (also a ritual action), and he had fasted all day and all night. Thus, he had unconsciously worshipped the Lord during the night of Shivaratri and had earned great merit by the observance. As a reward, his soul granted place in various heavens until it reached the highest, and he was afterwards reborn in high rank as a king and was specially favoured by being given the knowledge of his former life. Thus the Maha Shivaratri fast is said to have been first observed by Chitra Bhanu and the custom is still practiced in India. On Maha Shivaratri, devotees observe fast, offer fruits, flowers and bel leaves on Shiva Linga and keep vigil all night in honour of Lord Shiva.
Another legend in the great epic Ramayana tells of King Bhagirath who once left his kingdom to meditate for the salvation of the souls of his ancestors. He observed a penance for a thousand years, requesting Ganga to come down to earth from heaven and wash over his ancestor's ashes to release them from a curse and allow them to go to heaven. To fulfill his wishes, Ganga descended on the head of Lord Shiva who let the waters of the river reach the earth through his thick matted locks. The bathing of the lingam is said to commemorate this legend.
Om namo hiranya bahade
Pashupataye Namo Namaha
Brahma Shivo me Astu Sada Shiv Om
Tanno Shiva Prachodayaat
Oho devaya vidmahi
Tanno Shiva Prachodayaat
Namaste Astu Bhagavan
Shriman Mahadevaya Namaha