Once upon a time, there was a sage called Veda Vyasa who was living on the banks of a river. One day, as he was meditating, he got a vision where he saw a great set of events happening. This collection of events passed through his mind and at once he came to know about them. He then felt that this must be passed on to the rest of humanity as well and so he decided to write it down. But before this, he decided to seek the help of Lord Brahma.
Sage Veda Vyasa then meditated with Lord Brahma in his mind. He meditated for days and nights and finally after many days, Lord Brahma emerged in front of him. Lord Brahma praised sage Veda Vyasa for his intentions and told him to approach Ganesha for help. Sage Veda Vyasa thanked him and Lord Brahma disappeared after this.
Sage Veda Vyasa then worshipped Ganesha and he appeared in front of him. Ganesha then asked him as to what it was that he wanted and he replied by saying that he wanted to write those great sequences of events which he had seen in his trance. Ganesha then said that he would be happy to write down whatever he said, but it would only happen on one condition. The condition was that Veda Vyasa should not stop his dictation for any reason once Ganesha started writing. Veda Vyasa agreed to this and Ganesha sat down with him to start writing. But just as Ganesha sat down and took a couplet to write on, he realised that he had nothing to write with and so he broke one of his tusks to use it for writing!
Ganesha then wrote the first word, which was the title of this great sequence of events. The title was “Mahabharata”.