I'm puzzled by Ashvatthaman's status as a chiranjivi. Not necessarily that he is one, but more the circumstances surrounding it. To wit, Ashvatthaman is made to wander the earth endlessly for 3000 years (and thus he is a chiranjivi) and he will bear all the diseases afflicting the world. I've heard others say that Ashvatthaman is a chiranjivi because he will take on the role of Vyasa in the next cycle of yugas, but have not been able to substantiate this claim with textual sources. To me, this all seems like an odd mixture of punishment and reward - Ashvatthaman is made immortal, and will perhaps have the honor of serving as Vyasa, yet he is clearly being punished as his perpetually diseased state demonstrates. Any insights on the why of all this?
First let me recount the story of Ashwatthama's curse, which is told in the Sauptika Parva of the Mahabharata. After the Mahabharata war, Ashwattama, in order to avenge the death of Duryodhana at the hands of the Pandavas, and presumably also to avenge the death of his father Drona, went into to the camp of the Pandavas at night to kill them. But the Pandavas were away that night, and Ashwatthama instead killed the Upapandavas, the five sons the Pandavas had with Draupadi, thinking it was the Pandavas. When he realized that he had killed five innocent boys, he went to the Ashram (hermitage) of Vyasa to repent for his sin. Then Krishna the Pandavas found out that Ashwatthama had killed their sons, so they tracked his chariot to Vyasa's hermitage.
When he saw them, Ashwatthama feared for his life, so he launched a Brahmastra (weapon of Brahma) at them. And in response Arjuna launched a Brahmashirastra. To prevent the two extremely destructive weapons from doing any damage, the sages Narada and Vyasa came and persuaded Arjuna to withdraw his weapon. Vyasa asked Ashwatthama to do the same, but he couldn't withdraw the Brahmastra, so instead he redirected it to hit the wombs of the Pandava women. This did not serious damage, because although it killed the unborn baby Parikshit in the womb of Abhimanyu's wife Uttara, Krishna was able to bring it back to life.
In any case, for all his crimes, Krishna issued the following curse on Ashwatthama:
As regards thyself, all wise men know thee for a coward and a sinful wretch! Always engaged in sinful acts, thou art the slayer of children. For this reason, thou must have to bear the fruit of these thy sins. For 3,000 years thou shalt wander over this earth, without a companion and without being able to talk with anyone. Alone and without anybody by thy side, thou shalt wander through diverse countries, O wretch, thou shalt have no place in the midst of men. The stench of pus and blood shall emanate from thee, and inaccessible forests and dreary moors shall be thy abode! Thou shalt wander over the Earth, O thou of sinful soul, with the weight of all diseases on thee.
So Krishna's utterance was purely a curse; there wasn't any reward to go along with it.
But you are right that Ashwatthama will become the Vyasa of the next Mahayuga, as (Krishna Dwaipayana) Vyasa's father Parashara says in the Vishnu Purana:
In the next Dwápara, Drauńi (the son of Drońa) will be the Vyása, when my son, the Muni Krishńa Dwaipáyana, who is the actual Vyása, shall cease to be (in that character).
But this isn't a reward for his misdeeds. Rather, it's due to the fact that upon hearing Krishna's curse, Ashwatthama told Vyasa that he planned to be with him: "With thyself among all men, O holy one, I shall live! Let the words of this illustrious and foremost of men become true!"
So presumably it is the time that Ashwatthama will have spent with Vyasa, engaging in spiritual pursuits and atoning for his sins, that will make him deserve to succeed Vyasa.
It was said in order to escape from the curse of Lord Krishna, Aswatthama approached his Parama Guru (guru's guru) Lord Parasurama, who was also an avatar of Lord Vishnu. Lord Parasurama felt pity at Aswatthama and agreed to help him. It was said that Aswatthama was only an instrument in Lord Shiva's plan to exterminate all the evil people from earth. Since it was Lord Shiva who entered into Aswatthama's body and exterminated Pandava forces, Aswatthama was absolved of all sins.
It was said that Pandavas met Aswathama once again 36 years later when they were travelling to the Himalayas to seek pardon from Lord Siva for their heinous crimes in war. The description says Pandavas found Aswatthama happy in the company of Lord Parasurama and Sage Durvasa in an ashram on the banks of river Ganga and Aswatthama was found free from all curses. It was believed that Lord Parasurama and Maharishi Durvasa initiated Aswatthama into Sakthi worship, which is considered to be the supreme of all modes of worship. By worshipping Adi ParaSakthi, the mother of Lord Brahma, Lord Vishnu and Lord Rudra, Aswatthama bypassed the curse of Lord Krishna.
This story is described in Kumara Vyasa Mahabharatha, which i couldn't get any English Version.