The Purans contain many stories and legends describing the origin of this Maha Shivratri festival. According to one, during the samundra manthan, a pot of poison merged from the ocean. This terrified the gods and demons as the poison was capable of destroying the entire world, and they ran to Lord Shiva for help. To protect the world from its evil effects, Lord Shiva drank the deadly poison but held it in his throat. Because of it, he was given the name Neelkantha. On the eve of Maha Shivratri festival we worship lord "Shiva" or "Nilkantha"
It is believed that once Brahma and Vishnu, the two pillars of the holy Trinity were having an argument as to who was supreme. Brahma declared himself to be the Creator and the Destroyer, he commanded more respect. At that moment a huge lingam ablaze with flames appeared from nowhere. Both the gods were so overwhelmed by its constantly increasing size that they forgot the quarrel and decided to determine the size. Neither could ascertain the size. Just then, Shiva appeared out of the lingam and proclaimed that he was the progenitor of both of them. He was the Creator, Preserver and the Destroyer. He demanded that there after he be worshiped in his phallic form, the lingam.
According to the Shiva Purana, the Maha Shivratri worship must incorporate six items: the ceremonial offer of cooling bael leaves to the deity, representing purification of the soul; the vermilion paste applied on the linga after bathing it, representing virtue; food offering which is conducive to longevity and gratification of desires; incense, yielding wealth; the lighting of the lamp which is conducive to the attainment of knowledge; and betel leaves marking satisfaction with worldly pleasures.
Hymns in praise of Lord Shiva are sung with great fervor and devotion during the night of mahashivratri. People repeat the Panchakshara Mantra, Om Namah Shivaya on the eve of mahashivratri festivals.It is believed that one who utters the name of Shiva during Maha Shivratri with proper devotion is freed from all sins. Shiva being an ascetic god, Maha Shivratri festival is very popular with ascetics. Thandai, a drink made with cannabis, almonds, and milk, is essentially drunk by the devout. This is so because cannabis is said to have been very dear to Shiva.