Medha muni narrated the story of Durga Saptashati to the King and Vaishya. In chapter -1, he told the story of slaying of Madhu & Kaitabha by Ma Mahakali and Her worship done by Brahma ji to save him from the demons. The story goes as under:
Formerly in the Svarochiṣha Manvantara there was a king Suratha who was of great strength and exploit. He was very munificent, truthful, efficient in duties, a devotee of the goddess, an ocean of kindness and the protector of his subjects. Other kings became desirous of seizing his land. They laid siege to his capital Kola. The king had a terrible war with them. That king was defeated by his powerful enemies in the war. His kingdom was seized, and he was banished from his city Kola. The king went to another city of his along with his ministers. There too he was defeated by his enemies who had a large following. His ministers and officers became inimical to him due to adverse fate. They took away all the wealth from the treasury. The king left his city pretending to go out for hunting. Alone he got up on a horse and went to the dense forest.
Going about here and there, the king saw the hermitage of a great sage. It was shining all round with flower gardens. Everywhere the sound of Vedic hymns was heard. All the animals there were quiet and peaceful. The disciples and the disciples of their disciples moved here and there. Tigers and other ferocious and powerful animals did not harass the animals of less strength in that hermitage, thanks to the power of the leading brahmin. The king who was very kind and learned was welcomed and honored by the leading sage with pleasing words, accommodation and food and stayed there.
Once the king began to think anxiously — “Alas, my kingdom has been seized by my haughty enemies. I am unfortunate. My intellect is confounded. I have lost my splendor. The kingdom which had been well guarded by my ancestors is now enjoyed by my enemies. There was no king in this family as weak as I. What shall I do? Where shall I go? How shall I get the kingdom back? My hereditary ministers and counsellors have left me. I do not know which king they serve now. I do not know what plight they are in, after the ruination of the kingdom. My heroic soldiers, very enthusiastic in the battle, slayers of enemies, now serve another king. Huge elephants like mountains, horses fast as wind have gone away. Is the traditional treasury accumulated by my ancestors well-guarded or not? Thus, the very virtuous king became much deluded.
In the meantime, a Vaishya came there. The king asked him— “Sir, who are you? Why have you come here? Why do you appear to be very morose and dejected? Please tell me this, now.” On hearing the sweet words of the king, the leading Vaishya named Samadhi shed tears. He spoke to the king in words full of humility and friendship.
The Vaishya said: --
“O king, I am a Vaishya Samadhi, born of a rich family. Out of greed for my wealth I have been abandoned by my wife, sons, and others. I am depressed. O king, I have come here to the forest. I am worried about my sons, grandsons, wife, brothers, their sons, and friends. O lord, ocean of mercy, I am in dark about their welfare.
The king said: --
How is it that you love, even as senseless animals do, those sons and others who are of evil conduct and covetous for wealth and by whom you have been ousted?
The Vaishya said: --
O king, words loaded with substantial sense have been uttered by you. Still my mind is deluded by the tie of love.
The king and the Vaishya, both equally deluded then approached the sage Medhas. The valorous king accompanied by the chief of the Vaishyas bowed his head to the leading Yogi. With palms joined in reverence the king spoke to the sage: — “O holy lord, it behooves you now to dispel our delusion. Abandoned by the royal glory I have resorted to this dense forest. Still, I am not content and happy since my kingdom has been taken away. This Vaishya has been expelled from his house by his people, wife, and others. Still his sense of affinity and kinship with them does not go off. What is the reason hereof? Please say. Wise though we are, our minds are afflicted and agitated by delusion. This is great foolishness.
The sage (Medha muni) said: --
The great Maya in the form of the eternal Shakti is the material cause of the universe. It is this that drags the minds of all and makes them deluded. O lord, Brahma and other gods deluded by this Maya do not realize the truth. What then is the story of men?
The king said: --
O sage, who is that Goddess? Who is that great Maya who fascinates all? How was that goddess born? Please tell me.
The sage said: —
When the whole universe had been one great expanse of water, a vast sea, when Keshava, the king of Yogis, resorted to Yogic slumber and was sleeping on Sheṣhnaga, two Asuras were born of the dirt in the ears of Vishnu. They became notorious on the surface of the world in the names of Madhu and Kaiṭabha. They were terrible with huge bodies. They had the dazzling brilliance of the sun at the time of dissolution They had huge jaw bones. Their faces were hideous with curved fangs. They seemed to devour all the worlds. On seeing the lotus-seated deity in the umbilical lotus of the lord, the two Asuras shouted “Hey, who are you?” and attempted to kill him.
On seeing the two Daityas and observing that Vishnu was still lying in the vast milky ocean, Brahma eulogized Parameswari. Brahma said: --
O Mahamaya, save me, save me, O goddess favorably disposed to those who seek refuge in you, O mother of the universe, save me from these Daityas of hideous features. I bow to the great Maya, the Yogic slumber, Uma, Sati, Kalaratri, Maharatri, Moharatri, greater than the greatest, the mother of the three deities, the eternal, the bestower of the fruits of the cherished desires of the devotees, the protectress of the gods and the ocean of mercy. It is by your power that Brahma creates the world, Vishnu protects it, and Shiva destroys it at the opportune time.
O Mother, you are Svaha, Svadha, Hri, the unalloyed intellect, Tuṣṭi (satisfaction), Puṣṭi (nourishment), Shanti (peace), Kṣanti (forbearance), Kṣudha (hunger) and mercy itself. O mother, you are the Maya of Vishnu, the very consciousness, the great Shakti, Lajja (bashfulness) and Tṛṣṇa (thirst). You are Bhranti (Illusion). You appear in the form of Smṛti (Memory): you stay assuming the form of mother. You are Lakshmi in the house of those who engage themselves in meritorious activities. You are Jati (Birth), Vṛtti (cause of activity) and Vyapti (pervasiveness.) You pervade everything in the form of intelligence.
O Mother, please delude these unthwartable Asuras. O origin of the universe, please waken Vishnu the unborn lord.”
O king, on being requested by Brahma for the destruction of Madhu and Kaiṭabha, the mother of the universe, the great Vidhya, the presiding deity of all Vidhya, Shakti the enchantress of the three worlds manifested herself as Mahakali on the twelfth Tithi of the bright half of the month of Phalguna.
Then a celestial voice arose: — “O lotus-seated one, do not be afraid. I shall remove the thorn after killing Madhu and Kaiṭabha in the battle.”
After saying this and coming out of the eyes, mouth etc. of Vishnu, the great Maya stood before Brahma of unmanifested birth. Vishnu, the lord of gods stood up and saw in front of him the Daityas Madhu and Kaiṭabha. A battle ensued between Vishnu of unequalled splendor and the two Daityas lasting for five thousand years. Then there ensued a hand-to-hand fight. Deluded by the powerful great Maya, the excellent Danava spoke to the lord Vishnu— “Ask for whatever boon you desire to choose.”
Narayana said: — If you are pleased with me grant me this boon that I may kill you. I do not request for any other boon.
On seeing the earth covered by a great expanse of ocean they spoke to Keshava: — “Kill us in a spot where the earth is not covered with water.” After giving his consent the lord lifted his dazzling discus, placed their heads on his loins and cut them off.
Every person is deluded by ignorance, attachment, and desires which are caused by Maya created by feminine shakti. Worship of Ma Durga annihilates ignorance, attachment, and desires to liberate him.