The epic is traditionally ascribed to the sage Vyasa, who is also a major character in the epic. Vyasa described it as being itihāsa (history). He also describes the Guru-shishya parampara, which traces all great teachers and their students of the Vedic times.

The first section of the Mahabharata states that it was Ganesha who wrote down the text to Vyasa's dictation. Ganesha is said to have agreed to write it only if Vyasa never paused in his recitation. Vyasa agrees on condition that Ganesha takes the time to understand what was said before writing it down.

The epic employs the story within a story structure, otherwise known as frametales, popular in many Indian religious and non-religious works. It is recited by the sage Vaisampayana, a disciple of Vyasa, to the King Janamejaya who is the great-grandson of the Pandava prince Arjuna. The story is then recited again by a professional storyteller named Ugrasrava Sauti, many years later, to an assemblage of sages performing the 12-year sacrifice for the king Saunaka Kulapati in the Naimisha Forest.

The text has been described by some early 20th-century western Indologists as unstructured and chaotic. Hermann Oldenberg supposed that the original poem must once have carried an immense "tragic force" but dismissed the full text as a "horrible chaos."considered that "only unpoetical theologists and clumsy scribes" could have lumped the parts of disparate origin into an unordered whole.


After Mahabharat they return to their respective kingdoms, rule for few decades (around 35 years) and then leave this world for ever having served their purpose of life. The Mausala Parva and theMahaprasthanika Parva of Mahabharat has the detailed description about it. The major events in breif are:

After Mahabharat war is over, Gandahari struck with grief on the death of his sons curses Shri Krishna that the Yadavas will also die a same death. Shri Krishna accepts the curse.After around 35 years the sons of Shri Krishna playfully misbehaved some rishis and got cursed in return. Samba dressed as a pregnant woman, along with other Yadavas, went on asking rishis to predict the gender of her future child. One rishi gets angry and curses he will give birth to an iron piece which will destroy their entire race.Dwarika witnesses bad omens and sinful activites increase. Shri Krishna instructs others to go on a pilgrimage to Prabhasa.At Prabhasa, the Yadavas drink wine and get intoxicated. A fight ensues among them and every Yadava kills one another. Only Shri Krishna, Daruka, Vabhru and Balarama survive. But later on Vabhru and Balarama leave this world too.Shri Krishna sends Daruka to inform Arjuna and bring help. Meanwhile, a hunter mistakenly shoots an arrow that strikes at Shri Krishna's foot and leaves Him wounded. Shri Krishna consoles the hunter and then merges in the image of Vishnu and leaves this mortal world for His own abode.Arjuna reaches there. Tries to save widowed queens of Shri Krishna but loses in fight against the barbarians. Vedavyasa instructs Arjuna that the Pandavas' purpose of life has been over.Yudhisthira coronates Parikshit and the 5 Pandavas along with Draupadi set out for their journey towards heaven by climbing the mountain Himalaya. A dog follows them on their way up to the mountain.Along their way while climbing the mountain one after another in the order of Draupadi, Sahadeva, Nakula, Arjuna and Bhima fall down and die.Yudhisthira alone survives and Indra comes to welcome to heaven him with his chariot. Indra asks Yudhisthira to leave the dog behind and enter into the chariot and go to heaven.Yudhisthira declines the offer to enter into heaven unless the dog also goes with him as the dog has befriended him. The dog then becomes Yama and tells Yudhisthira that he has passed the test. After that Yudhisthira enters into heaven.

Thus, after many such series of events Shri Krishna and the Pandavas leave this mortal world. The city of Dwaraka submerges into the ocean and eventually the present age of Kali begins.