Once Brahma was reformed by Lord Shiva, he took up the job of creation. On the other hand, Vishnu indulged himself in a deep slumber before taking up the role of sustainer. While he was asleep, from his ear-dirt, were born two demons, Madhu and Kaitabha. They were tiny and coward. Whenever they tried to come out from Vishnu’s ears and roam in the cosmic ocean, the sea-creature created by Brahma would attack them. Each time they had to flee. One fine day, they came out of Vishnu’s ears to discover the world around them. But a shark charged towards them. On seeing this, Sesha shooed away the shark and saved the two brothers. They said “Oh serpent! You have saved us. Thank you very much.” Sesha said “These creatures always harass you. Why don’t you two fight them back?” The two replied “What can we do? We are so tiny and weak.” Sesha said “Then you must do what my Lord does.” The two asked “What does he do?” Sesha said “He worships Goddess Mahakali. That is why he is mightier than Brahma.” “Who is Brahma?” asked the demons. Sesha told them about Brahma and also that he is one who is creating the creatures which are blood-thirsty for them.
Later, Madhu-Kaitabha retreated into Vishnu’s ears and started performing austere penances. After some decades, Goddess Mahakali was impressed by there penances. She appeared before them and said “Open your eyes, my sons.” The two demons opened their eyes and were filled with joy on seeing Ma Mahakali in front of them. She spoke in a polite tone “What boons do you desire for?” The demons said “Oh Mother Goddess! Please accept our obeisance. Mother, your sons are often harassed by the giant creatures that live in seas. Because of there fear, we cannot step out of this cave (Vishnu’s ear). Kindly give us strength so that we can fight them back and protect ourselves. Oh Mother! Please make us immortal.” Ma Mahakali said “I cannot make anyone immortal, my sons. You both have taken birth and according to the rules set by me, one who has taken birth will have to die some day. I cannot make any special consideration for anyone. But yes, I grant you strength for self defense. Instead of immortality, ask for anything else.” The demons said “Oh Mother, if we are destined to die, then let it be only when we wish to die.” “So it be.” Said Ma Mahakali. “But remember; do not misuse your powers.” Saying thus, Ma Mahakali vanished.
Once empowered, Madhu and Kaitabha roamed fearless. They did not fear the sea creatures anymore. One day, they saw Brahma. On seeing him, they got hungry and ran to eat him. Ma Mahakali was overlooking these events with Lord Shiva and said “Shiva, I warned them not to misuse their powers. But they ignored me. Now I’ll teach them a lesson.”
On being attacked by the demons, Brahma tried to defend himself, but was no match for the demons. He ran to Vishnu and cried out “Master! Save me! Save me from these demons!” But Vishnu did not respond. A divine voice told him that Vishnu is in a deep slumber and Mahamaya, the illusion created by Ma Mahakali is prohibiting Vishnu from arising. Now Brahma started praising Ma Mahakali. Once appeased, she withdrew the illusion from Vishnu’s body and encouraged him to rise and fight. Vishnu immediately recognized Madhu and Kaitabha as his sons. He said “My sons! Why do you wish to harm Brahma! If he is harmed then the creation will not be possible.” The demons said “We don’t know who you are. But this Brahma is responsible for our suffering. Let us kill him. Don’t interfere. Or else we won’t spare you either.”
Vishnu said “Then I am afraid, I’ll have to kill both of you.” Saying so, Vishnu charged with his mace to fight the demons. They fought for five hundred years. Madhu and Kaitabha took turns to fight Vishnu, due to which Vishnu was exhausted. He thought “Oh Mother Mahakali! Is there no end of this battle! I know that I am bound to emerge victorious. Or else Brahma will be killed. What should I do?”
Now Ma Mahakali possessed Vishnu’s body and said “My sons! I am impressed by your valor. Ask me for boons.” Madhu and Kaitabha were filled with pride and said “What are you talking about? We have defeated you. You ask for a boon. After all, we are more powerful than you.” Vishnu said “If this is so, then I wish that both of you die at my hands.” Madhu and Kaitabha realized that they have been fooled. But since they promised to bestow any boon Vishnu asks for, they said “So it be. But we wish to die at some place which is not submerged in water.” Vishnu then took a giant form and said “Now both of you lie down on my lap.” The moment the lied down, Vishnu beheaded both with his discus.
After both were dead, Ma Mahakali withdrew from Vishnu’s body and stood at the left of Lord Shiva. She assured Brahma safety and created two Goddesses, Lakshmi and Sarasvati. She gave Lakshmi to Vishnu and Sarasvati to Brahma as wives. Lord Shiva blessed the corpses of Madhu and Kaitabha and turned them into land.