The most famous legend associated with Navratri is the battle between the great goddess Durga and the demon Mahishasura. As per the Hindu mythology, goddess Durga was born in order to kill Mahishasura.
Mahishasura was a mighty demon who was half buffalo and half human. Mahisha means buffalo. Mahishasura wanted to defeat gods and wanted to have supremacy over them. In order to have his desires fulfilled and to attain invincibility, he started praying to Brahma. He asked the power of immortality, but Brahma denied the boon knowing the dangerous consequences. Instead he blessed the demon saying that his death would happen only at the hands of a woman. Mahishasura was pleased at the boon, and considered him immortal. He believed that it is impossible for a woman to conquer him.
Considering him as unconquerable, the demon waged war against the gods. He could easily defeat the Indra-led deva team. He also started killing and attacking all the living beings. Devas prayed to the trinity of Shiva, Brahma and Vishnu to find a permanent solution to the atrocities done by the demon. Shiva, Brahma and Vishnu united their power and created a beautiful and powerful woman named Durga. The radiant goddess contained all the mighty powers of the trinity and other deities.
Enchanted by the beauty of Durga, Mahishasura approached her with the intention of marriage. The goddess agreed to marry him on the condition that he should win over her in a battle. Being overconfident about his power, he agreed immediately. The battle was fierce, and continued for nine nights. On the ninth night, goddess Durga beheaded Mahishasura. These nine nights are called Navaratri. The tenth day is called Vijayadashmi as it pronounced the triumph of good over evil.