How Ekadashi was born
Padma Purana, as told in the Ekadashi mahatmya
A demon named Mura drove the gods out of heaven. Vishnu fought him for a thousand years and, weary, went to rest in a cave at Badarikashram.
Mura followed him in to kill him in his sleep. But a radiant young woman came out of Vishnu's body, armed, and killed the demon.
When Vishnu woke he asked who she was. She had been born on the eleventh day of the waning moon, so he named her Ekadashi, "the eleventh", and promised that whoever fasted on her day would be freed from wrongdoing. That, the story says, is why there are Ekadashi fasts.