There are multiple legends associated to this day. Some say that Lord Shiva drank a deadly poison which was extracted from the Samudra Manthan in order to save the world. Then we have another legend, according to which, on this day lord Shiva tangled Ganga in his hair and some legends say that day was chosen as the favourite day of Shiva, hence it s celebrated as Shivratri.
According to a legend, during the Samudra Manthan, when gods and demons were churning a mountain for the immortal drink called Amrit, a pot of poison also emerged from the ocean. This terrified the gods and demons as the poison was capable of destroying the entire world and they ran to Shiva for help. To protect the world from this malignant poison, Shiva drank it but held it in his throat instead of swallowing it. Thus, his throat changed to a blue colour and he was then given the name- Nilkantha- the one with blue-throat. Since then, this very day is celebrated as Shivratri.
There are many other legends related to this festival. According to the other legend, goddess Parvati once asked Shiva that out of all the days which one was his favourite. To which the lord replied that he liked the new moon day, which is the 14th day of Phalgun month. Parvati spread the word among her friends and soon the entire universe got to know about it and since then Mahashivratri is celebrated.
Shiva and the river Ganga
There is one more legend associated to the festival of Mahashivratri. It is said that when Ganga was descended from the heaven after the request of Bhagirath. He wanted Ganga to come down on Earth and wash way his ancestor’s ashes to help them find the way to heaven. The river Ganga was enormous and uncontrollable, so Lord Brahma asked him to request Shiva as he was the only one who could control her fall. Shiva agreed to it and he held the rapid flow of Ganga by tying it up in his hair. That is why devotees either go to the river Ganga on the occasion of Shivratri or bath Shiva with Ganga’s water in the temples.