Mahabharata basics · Mahabharata questions
Who wrote the Mahabharata?
Tradition credits the sage Vyasa, also called Krishna Dvaipayana, who is both the author and a character in the story. Scholars treat the epic as the work of many hands over several centuries, compiled and expanded by generations of bards and editors rather than written by one person.
The epic names its own author. Vyasa, born to Satyavati and the sage Parashara before her marriage to King Shantanu, is the great-grandfather of the warring cousins and fathers Dhritarashtra, Pandu and Vidura himself. He appears throughout the narrative, arriving at moments of crisis to explain a curse or restore a dead child. Tradition adds that he dictated the poem to Ganesha, who agreed to write on the condition that Vyasa never pause, and Vyasa answered with knotted verses that forced the scribe to stop and think.
The text also describes its own growth. It says that the poem was first called Jaya, that it ran to twenty-four thousand verses as the Bharata, and that it reached a hundred thousand with the added tales and teachings. That is a description of a work which expanded, and modern scholarship reads it the same way. The Mahabharata was composed and recomposed orally by a class of bards, then fixed in writing, then enlarged again. The didactic books in particular, the long instruction of Bhishma in the twelfth and thirteenth parvas, are generally taken to be later additions to a shorter heroic core.
Dating that process is contested. A common scholarly range puts the composition between roughly the fourth century BCE and the fourth century CE, with older material inside it and later material added around it. No single manuscript preserves an original. The critical edition prepared at the Bhandarkar Oriental Research Institute in Pune between 1919 and 1966 compared more than a thousand manuscripts to reconstruct the oldest recoverable text, and it is about a quarter shorter than the popular versions.
So both answers are true in their own register. In the tradition the author is Vyasa. Historically the Mahabharata is a library assembled under his name.