The Chandi is divided into three parts. In the first part Devi appears as Mahamaya which is described as yoga-nidra of Vishnu. That is to say, Mahamaya is the power of Tamas which makes people lethargic, indolent and sleepy. Under the influence of this cosmic delusive Power, Lord Vishnu went to sleep. At that time two demons by name Madhu and Kaitabh came out the ears of Vishnu and attacked Brahma the Creator God. Brahma then praised the Divine Mother as Mahamaya or Yoga-nidra. Pleased with the petition, she withdrew herself from Vishnu's body. Vishnu now woke up and killed Madhu and Kaitabh.
In the second part Devi appears as Mahishasura-mardini and is also called Chandika. The story goes that when a powerful demon by name Mahishasura was the king of the Asuras (demons), they attacked the Devas (gods) and vanquished them. The defeated gods went to Shiva and Vishnu and complained about the atrocities of Mahishasura. Hearing this, Vishnu, Shiva and other presiding Deities became angry. The rays of their anger combined to form a supremely powerful and dazzlingly bright female Being - the Devi known also as Chandika and Ambika. Seeing the dazzling brightness of the Devi, Mahishasura first sent his army to attack Her. But the Divine Mother exterminated them all. Then Mahishasura, who had the form of a buffalo, himself attacked Her. Devi at once jumped upon his body, pressed his neck with her foot, struck his chest with her spear, and finally cut off his head. The gods being extremely relieved and pleased, praised the Devi, and their praise takes up the rest of the second part of Chandi.
In the third part of the book, Devi appears first as Parvati and then, out of her form, there arises another form known as Kalika. But she continues to be referred to as Ambika. The third part narrates another valorous act of the Divine Mother. Once upon a time two brothers, Shumbha and Nishumbha became lords of the three worlds, and the gods lost everything. Coming to know of the beauty of Kalika, they sent word to her asking her to come to them. When she spurned their order, they at first sent two demons, Chanda and Munda, to capture her. Seeing them, Ambika became angry and out of that anger there issued forth a terrible form known as Kali who fought with the demons. Finally Kali cut off the heads of Chanda and Munda. She thus came to be called Chamunda. Now Shumbha and Nishumbha themselves rode in their chariots and attacked Ambika and Kali. After a protracted battle Ambika herself destroyed Shumbha and Nishumbha.