This Ekadasi is described in the Brahmanda Purana in a conversation between King Mandhata and the great sage Vasistha.
The King Mandhata enquired from Vasistha Muni, "O most fortunate sage, please be merciful unto me and kindly describe unto me a vow, by whose observance I may attain all auspiciousness." The famous sage replied, "O King, I will explain to you the glories of and history of Amalaki Ekadasi, by following of which one receives all auspiciousness in their lives. The piety accumulated by observing this great Ekadasi undoubtedly destroys all sinful reactions and easily awards one liberation. It also gives the benefit of offering one thousand cows in charity.
"A long time ago, when the world was very ancient there was a magnificent city called Vaidisa. The city was home to many healthy, prosperous brahmanas, ksatriyas, vaisyas and sudras. O lion-hearted King, there were no atheists in this city at all and the citizens had not even heard of sin. The air was always filled with the sound of Vedic mantras, chanted by the expert priests, and everyone was very contented by the religious atmosphere.
In this fabulous city there lived an honest and pious King named Caitraratha who was born the son of King Pasabinduka, a lordly member of the dynasty of the moon. King Caitraratha had abounding strength, beauty, opulence and wealth; he was well in the scriptures and his citizens loved him. Because of the religious fervour of the people, they would all always follow Ekadasi. Due to such devotional service unto Lord Visnu the people remained happy in their prosperous kingdom, there were no poor or miserly people to be found anywhere!
One propitious year Amalaki Ekadasi mixed with Dvadasi during the waxing moon in the month of Phalguna (February/March). Realising this Ekadasi was very powerful the King and his subjects prepared to observe the vow with great and special care. Early in the morning they bathed in the river and went to offer puja at the temple of Lord Visnu who resided on the river bank. Within the temple there was an amalaki and the King offered due respect by placing a pitcher of water, an umbrella, cloth, shoes, and five kinds of precious jewels at the base of the tree. He went on to worship Lord Parasurama with a beautiful canopy, gold, diamonds, rubies, pearls, sapphires and very fragrant incense. The sages prayed thus: "O great Lord Parasurama, son of Renuka, O you who takes shelter of this amalaki tree, O bestower of liberation, We offer our respectful obeisances unto you." They further offered poetic prayers to the amalaki tree. "O Amalaki, sustainer of the universe, O offspring of Lord Brahma, O destroyer of sins, We offer our respectful obeisances unto you."
After offering these prayers the King and his subjects proceeded to remain awake throughout the night, they stayed in that Visnu temple and sang songs of glorification to the Supreme Lord and the Amalaki tree. By providences will a hunter arrived on the scene. The hunter made is livelihood by killing animals and had never seen such a sight before. He was bewildered by the company sitting peacefully and chanting to the Lord. He decided to sit down as well and observe the sankirtan of the Lord. By way of great fortune he unknowingly took darshan of Lord Damodar who was seated atop the pitcher of water. He stayed awake all night and despite his hunger he did not eat anything, nor did he kill any animals.
In the morning the King and his courtiers returned to their palace and the hunter also returned home. Many years later the hunter left his body, but despite his sinful life he received liberation simply by the grace of Amalaki Ekadasi. In his next life the hunter became a King with many elephants, horses, chariots and a large army. He was known by the name of Vasurath, son of a powerful King called Vidurath who ruled the famous city of Jayanti. King Vasurath ruled over one million villages, was as effulgent as the sun and as powerful as Lord Visnu. He was truthful, tolerant and fixed in his occupational duties. Thus he was a great devotee.
"One day Vasurath lost his way while hunting in the forest. He was extremely fatigued and afflicted with hunger. Finding no alternative the King lay down to sleep in the dense forest, with no pillow he slept on the bare earth. While sleeping in the way a band of nomadic mlecchas came across the King and thinking him their enemy proceeded to beat him with their various weapons. Strangely enough none of the weapons caused even a slight disturbance to the saintly King. Bemused by this magic the mlecchas turned to run away, fearful for their lives. At that moment an effulgent goddess appeared before them holding a a disc in her hand. She was adorned with various shining ornaments and fragrant sandalwood paste. Raising her arm she flung the disc at the mlecchas and killed them outright.
When the King woke up he was astonished by the gruesome scene and became frightened. Seeing that his fearsome enemies were all dead the King exclaimed: "Who is my protector who has slain these enemies for me? I offer my heartfelt gratitude to such a well wishing benefactor." Just then a voice from sky thundered: "Who else but Lord Kesava is capable of protecting His surrendered souls? He alone is the maintainer of the surrendered devotees and the universe." After hearing this voice in the sky the King's heart melted in devotional ecstasy. Knowing that he had been saved by the Supreme Lord he considered himself very fortunate. With increased faith and determination he returned to his palace and ruled just like Indra, without obstacle or hindrance.
The sage Vasistha concluded, "My dear King Mandhata! Anyone who observes this sacred vow of Amalaki Ekadasi undoubtedly achieves liberation and returns the abode of Lord Visnu."