The legend or story associated with Yogini Ekadasi or Yogini Ekadashi Vrat katha is mentioned in the Brahma Vivarta Purana. Yogini Ekadasi, observed on Krishna Paksh of Ashad month in North Indian Hindi calendars, is the most important Ekadashi vrat to get rid of diseases and ailments.
Significance and importance of Yogini Ekadasi Vrata was narrated by Lord Sri Krishna to Yudhistira (Dharmaraj). Krishna told the story of Hemamali, a Yaksha who was working at Kubera, the King of Alakapuri. Hemamali was very much attracted towards his gorgeous wife, Swarupavati and neglected his daily duties that he was allocated to do for his master Kuber.
Hemamali’s daily work was to bring flowers from Manasarovar Lake. His master identified his carelessness towards his duties and asked one of his servants to go to his house and enquire. The servant went to Hemamali’s house and came to Kuber and informed that the reason of his negligence in his duties is his gorgeous wife. Kubera called Hemamali and cursed him to suffer from white leprosy and to separate from his wife. Thus Hemamali suffered from the terrible disease and separated from his wife.
When he met Sage Markandeya (Markandeya Maharshi), he suggested him to observe Yogini Ekadasi Vrata. Hemamali observed the fast on Ashadha Krishna Ekadasi and got rid of the dangerous infection and became a handsome Yaksha. He lived his rest of life happily with his wife.