The most famous literary works of the later Vedic period were the two great Epics, the Ramayana and the Mahabharata. The Epics were not written at one time. It is assumed by the scholars that the epics must have been composed in the period between 500 BC and 200 AD.
The Ramayana is believed to be the work of the sage Valmiki. The central theme is the story of Rama, who is pictured as an Incarnation of Vishnu, and Sita an Incarnation of Lakshmi. Rama was the eldest son of King Dasharatha, who ruled over Kosala with Ayodhya as Capital of his kingdom. The king wanted to appoint his eldest son Rama as the Yuvaraja, but this was opposed by his second Queen Kaikeyi. The king had promised her two boons. So she demanded that he gave the throne to her son Bharata and sent Rama into exile for fourteen years.
In the course of wanderings in the forest, Rama reached the territory near the Godavari, in the province called Janasthana. It was a colony of Rakashasas who had connections with the kingdom of Shri Lanka. Rama came to the rescue of munis (sages) living in the region and killed a number of Rakashasas who had ill-treated the sages. To take revenge on Rama, Ravana the non-Aryan ruler of Lanka, abducted Sita and took her to his capital. Rama fought against Ravana heroically, killed him and rescued Sita. Rama returned to Ayodhya and his coronation was celebrated with great rejoicing all over the kingdom.
The Mahabharata is believed to be the work of Ved Vyasa. The main story is about the conflict between the Pandavas and the Kauravas and the battle at Kurukshetra, which involved many Aryan kings of the period. King Shantanu of the Lunar dynasty was the ruler of Hastinapur, a region between Ganga and Yamuna. He was succeeded by his son Vichitravirya, who had two sons, Pandu and Dhritarashtra.
After the death of Vichitravirya, Pandu became the king. He had five sons known as the Pandavas. Pandu handed over the kingdom to his blind brother Dhritarashtra who had a hundred sons known as the Kauravas. All the princes were educated under Kripacharya and Dronacharya. Duryodhana, the eldest of the Kauravas, felt jealous of the Pandavas and planned to destroy them.
The Pandavas got the only barren tract of land near Delhi and founded the new Capital known as Indraprastha. Duryodhana was determined to destroy the Pandavas, so he invited the Pandavas to the palace for a game of dice. During the game, Yudhishthira, the eldest of the Pandavas, staked everything he had and lost his kingdom, his brothers, and even Draupadi, who was grievously insulted in the open court.
The Pandavas were sent to exile for thirteen years and after completing their term of exile, the claimed their kingdom again. Duryodhana refused to give their share of the kingdom and this resulted in the great war between the Pandavas and Kauravas.
Arjuna had refused to fight against his own relatives, but Lord Krishna who was his Charioteer, gave him the divine message of true dharma which was contained in Bhagavad Gita.