Ekadasi is a highly auspicious day dedicated to Lord Vishnu on the eleventh day of every lunar fortnight in traditional Hindu calendar. There are 24 Ekadasis in a year and 26 Ekadashis when there is an Adhika Masa in a Hindu lunar calendar. The yearly cycle of Ekadasi begins with the Utpanna Ekadasi in November/December. There is an interesting story regarding Ekadasi fasting and how the Ekadasi day gained such prominence is explained in the Ekadashi Vrat Katha.
Once Devas (demigods) and their King Indra were driven out of Swarga (heaven) by Asuras or Demons. As usual the Devas took refuge at the feet of Lord Vishnu and pleaded to him to restore their lost kingdom.
The current crisis for the Devas was created by Demon Mura – son of Demon Nadijangha and the ruler of Chandravati. Mura defeated all the demigods and started living in heaven.
Lord Vishnu promised to help them and asked the Devas to assemble at Chandravati to fight Demon Mura. Soon Mura appeared before them with a huge army.
Before the battle began, Lord Vishnu appeared and led the army of the Devas. The Lord easily defeated the demon army but could not defeat Demon Mura. Their fight was a never ending one and after awhile Lord Vishnu decided to take rest at a cave in Badrikasrama.
Lord Vishnu entered the cave and slept there for awhile. Mura soon arrived at the cave with the intention to annihilate Lord Vishnu. Suddenly, a fully armed female appeared from the body of Lord Vishnu and start fighting Demon Mura and she finally severed the head of Demon Mura.
When Lord Vishnu woke up from His sleep, He saw the severed head of demon Mura and saw a female standing beside it.
Lord Vishnu blessed the female and said that she was His energy and since she appeared on the 11th day of a lunar fortnight her name will be Ekadasi. And those who worship Lord Vishnu and observe Ekadasi Vrat will have their sins removed and blessed with Moksha or liberation.