There is a story behind how Shiva got blue throat and why he is known as Nilkanth. This is a story of Samudra Manthan the great churning of the ocean.
Once Indra the king of gods came across the sage Durvasa. Durvasa had a beautiful garland got from Lord Shiva. Durvasa saw Indra and thought to offer that garland to Indra as an offering. Durvasa offered that garland to Indra. Indra in his pride and ignorance put that garland on the tusk of Airavata. Airavata is an elephant, the ride of the god Indra. Airavata threw the garland to ground to diminish Indra’s ego. Sage Durvasa saw his garland on the ground and got angry for the reason that Indra dishonored his offering. Indra should have respected his offering. Sage Durvasa cursed Indra that all gods will lose their powers.
Gods were getting defeated by the Asuras. The Asuras were getting control of the universe. To gain the lost glory, Indra sought help from Lord Vishnu. Vishnu suggested that they can get their strength back and overcome the curse of sage Durvasa by drinking the Amrita, the nectar of life that will make them immortal. For this gigantic task gods required more strength. Gods made alliance with the king of Asuras. Gods convinced him that they shall share the outcome of this task. Gods and Asuras started this churning of the ocean with the help of Vasuki the snake as a rope and mount Mandar as churning rod. Vishnu in the form of turtle supported the mountain on his back so that it shall not sink into the ocean. The gods grabbed the tail and Asuras grabbed the head of the snake Vasuki. Then the gods and Asuras pulling the Vasuki back and forth started the churning of the ocean.
This Samudra Manthan gave out a poison called Halahala. It was so toxic that it could kill all and the whole creation was at stake. No one was able to handle that poison except Shiva. Shiva came to rescue and drank the Halahala poison. Parvati on seeing this kept her hand at Shiva’s throat to stop the Halahala poison from going down to his stomach. Shiva held the Halahala poison in his throat, which turned his throat blue. So, he is called as Nilkanth.
Neelkanth, literally means “The One With A Blue Throat”