Puranas include many testimonies describing the foundation of this festival.
1) In one, during samudra manthan, a poison pot emerged from the ocean. This terrified Gods and demons because the poison had the potential of destroying the whole world, and then they went to Shiva for assist. To shield the world from its consequences, Shiva drank the deathly poison however held it in his throat as opposed swallowing it. This made his throat flip blue, and he became “Neelakantha”.
2) Another legend in the Purana, suggests: Once, Brahma and Vishnu, were arguing over who was superior of them both. Horrified on the depth of the fight, other gods forced Shiva to interfere.
Shiva took the form of a fire column in between Brahma and Vishnu, to make them realize the worthlessness of their fight. Astonished by the magnitude, both of them decided to find its end to prove supremacy over the other. Where Brahma assumed the shape of a swan and went upwards ,Vishnu as Varaha went into the earth. But the light has no limits. Hence even they tried for long, they didn’t reach the stop. Brahma came across Ketaki flower during his journey. Ketaki told Brahma that she had been placed at the top of the fiery column as an offering. Brahma took the flower as evidence with him.
At this, angry Shiva revealed his true form. Bramha was cursed for lying that he would never be worshipped. The Ketaki flower was also punished for testifying falsely. Worshipping Shiva on Shivratri is believed to offer happiness and prosperity.
3) A legend on all night worship on Shivratri says: Once a poor tribal man, great devotee of Shiva went deep into the forest to collect firewood. However he lost his way and failed to return home by night. Terrified, by the howls of the animals, he climbed onto the nearest tree till day-break. He was afraid, he would doze and may fall off the tree. To stay awake, he decided to pluck a leaf at a time and drop it, in the name of Shiva. At dawn, he realized that he had dropped a thousand leaves onto a Shiva Lingam to keep himself awake. The tree happened to be a wood apple (bel, bilva) tree. His unwitting all-night worship pleased Shiva and rewarded him with divine bliss.
Immediately after Mahashivaratri, the trees are full of flowers as if, the fertility of the earth has been revived. And this is why the Linga is worshipped as a symbol of fertility. The festivities differ in various parts of India.
Mahashivaratri is not just a ritual but also a cosmic definition of the Hindu universe. It eliminates ignorance, spreads the light of knowledge, makes one aware of the universe, ushers in the spring after the cold and dry winter, and invokes the excellent power to take notice of the beings that have been created by him.