The legend behind Navratri is written in detail in Markandeya Purana. Durga Saptashathi is a part of the Purana, describing in length about the origin and birth of Shakti and her victories over the slain demons.
According to Hindu mythology, a demon named Mahishasura, earned the favour of Lord Shiva after a long and hard penance. Lord Shiva, impressed with his devotion, gave him a boon stating that no man or deity would be able to kill him but a woman can kill him.
Mahishasura was very pleased with this boon as he thought that no woman in the three worlds could match his might. Arrogant Mahishasura started his reign of terror over the universe and many people, Gandharvas and Kinnars were killed mercilessly. He had conquered earth, and set his eyes upon Indraloka, the abode of the Gods.
The Defeat of Gods
Mahishasur and his army invaded Indraloka. After defeating the King of Gods, Indra, he drove all the devas (Gods) out of heaven. After their defeat and humiliation at the hands of Mahishasur, the Gods took refuge under Lord Brahma.
Brahma took them to Lord Vishnu and Lord Shiva. Lord Shiva was in deep meditation and was totally oblivious to the happenings of the material world. The only solution to end the rule of demon King Mahishasur, was to create a woman who possessed the ultimate power to fight and defeat the unconquerable Mahishasura.
On hearing the atrocities of the demon, Lord Vishnu was furious and a brilliant and powerful energy came out of his being. Lord Shiva also came out of his meditation and angrily opened his third eye, from which came out a strong light, which merged with the already existing light of Vishnu. Brahma and other gods also put in their spiritual powers to the energy, which took the form of a female deity, who was radiant and extremely beautiful.
Culmination of Energies
Her face reflected the light of Shiva, her ten arms were from the light of Lord Vishnu, her feet were from the light of Lord Brahma, the tresses were formed from the light of Yama, the God of death and the two breasts were formed from the light of Somanath, the Moon God, the waist from the light of Indra, the King of Gods, the legs and thighs from the light of Varun, the God of Sea and hips from the light of Bhoodev (Earth), the toes from the light of Surya (Sun God), fingers of the hand from the light of the Vasus, the children of Goddess River Ganga and nose from the light of Kuber, the keeper of wealth for the Gods.
The teeth were formed from the light of Prajapati, the lord of creatures; the Triad of her eyes was born from the light of Agni, the Fire God, the eyebrows from the two Sandhyas, ie, sunrise and sunset, the ears from the light of Vayu, the God of Wind. As she was made from the female energies of devas and demigods, she was aptly named Shakti. The name Durga was given to her after she had killed a demon named Durg.
Power of Weapons
Goddess Durga possessed the unique individual powers of ten deities, which were symbolised by her ten arms, each of which held different weapons gifted to her by the Gods, like Indra’s Vajra, Shiva’s Trishul, Vishnu’s Sudarshan chakra, Varun’s conch, Agni’s spear, Vasuki`s snake.
From Yama, she received an iron rod, a sword and shield. Vishwakarma (God of Architecture) gave her an axe and armor. The God of Mountains, Himavat gifted her with jewels and a lion to ride on. Durga was also given many other precious and magical gifts, new clothing, and a garland of immortal lotuses.
The beautiful Durga, bedecked in jewels and golden armor and equipped with the fearsome weaponry of Gods, was ready to engage in battle with the fierce and cruel Mahishasura. When Mahishasura heard of Durga`s beauty, he wished to marry her and sent across a proposal.
The Goddess replied that she would marry him on the condition that he defeats her in a battle first. Mahishasura and his demon allies found their attention drawn from heaven to Earth.
As Mahishasura`s armies were struck down effortlessly by Durga, it became obvious to him that heaven could not shield him from the Goddess’ wrath. No demon could fight her and win. Her breath would replenish her armies - bringing back to life all of her soldiers who fell. The demons were in chaos and were easily defeated and captured.
Mahishasura was enraged yet shocked by the disastrous events on the battlefield. He took on the form of a demonic buffalo and charged at the divine soldiers of Durga, killing many and lashing out with his whip-like tail. Durga`s lion pounced on the demon-buffalo and engaged him in a battle. While he was thus engaged, Durga threw her noose around his neck.
Mahishasura then assumed the form of a lion and when Durga beheaded the lion, Mahishasura escaped in the form of a man who was immediately face to face with a volley of arrows from Durga. The demon escaped yet again and then having assumed the form of a huge elephant, battered Durga`s lion with a tusk. With her sword Durga hacked the tusk into pieces.
The demon reverted once more to the form of the wild buffalo. He hid himself in the mountains from where he hurled boulders at Durga with his horns. Durga drank the divine nectar, the gift of Kuber. She then pounced on Mahishasura, pushing him to the ground with her left leg.
She grasped his head in one hand, pierced him with her sharp trident held in another, and with yet another of her ten hands she wielded her bright sword, beheading him. At last he fell dead, and the scattered surviving remnants of his once invincible army fled in terror. Thus she came to be called as Mahishasuramardini.
The battle had gone on for nine days and nights and at last, resulted in the beheading of Mahishasura on the tenth. The nine nights became renowned as Navratri, while the tenth day was called Vijaya Dashami, the tenth day that brought the triumph of good over the evil.
There are various legends associated with its origin but the most important and prevalent among them is the legend of Lord Rama (the incarnation of Lord Vishnu). When Lord Rama was fighting a battle with Ravana (the demon king) to rescue his wife Sita whom Ravana had abducted and held as hostage in Lanka, his kingdom.
As the battle continued with neither parties failing, Lord Rama decided to seek the blessings of Shakti (Goddess Durga) in order to defeat the demon. The puja which was undertaken by Lord Rama required 108 blue lotuses for the worship of Goddess Durga but he could manage only 107. He decided not to discard the puja due to lack of a single lotus flower and instead thought of offering one of his eyes that was lotus-shaped and blue in color at the Goddess feet.
As he was about to offer his eye, Goddess Durga appeared and satisfied with his devotion, granted her blessing. Lord Rama won the battle against Ravana. The season during which he had performed this puja was spring and the tradition of celebrating Durga Puja has continued since then.
The Legend of Uma
In East India, legend has it that Daksha, the king of the Himalayas had a beautiful daughter called Uma, who since her childhood wanted to marry Lord Shiva. But King Daksha disliked Lord Shiva and his appearance disgusted him. He broke off all relationships with his daugher and son-in-law.
King Daksha planned a yagna, in which all were invited except for Shiva. Uma was greatly hurt by her father`s rude behavior and she immolated herself in yagna fire. However, she took re-birth again as Parvati and married Shiva, thus peace was restored. It is believed that since then Parvati or Uma comes on earth every year with Ganesh, Kartik, Saraswati Laxmi and her friends called Jaya and Bijaya, to visit her parent`s home during the nine days of Navratri.