He is also described as a Maharathi[1] who fought on the side of the Kauravas against the Pandavas in the Kurukshetra War, and was cursed by Krishna with immortality for his attempt to kill Uttarā's unborn child.
He was born with a divine gem on his forehead which gave him power over all living beings lower than humans; it also protected him from hunger, thirst, fatigue, old age, diseases, weapons, and deities.
When the weapon was invoked, violent winds begin to blow, the sound of thunder echoed, and an arrow appeared for every Pandava soldier.
Seeing his Narayanastra fail to kill the Pandavas, Ashwatthama invoked the Agneyastra and launched it toward all the visible and invisible foes.
The weapon soon overpowered and encompassed Arjuna with several fiery flaming arrows and created havoc within the Pandava army.
After a long duel of archery between them, Ashwatthama rendered Malayadhvaja weaponless and got an opportunity to kill him on the spot, but he spared him temporarily for more fighting.
[7] After the terrible death of Dushasana, Ashwatthama suggested Duryodhana make peace with the Pandavas, keeping in mind the welfare of Hastinapura.
Not recognizing him, Ashwatthama fearlessly started attacking the terrifying ghost with all his powerful weapons but failed to inflict even any damage upon it.
[8] After Ashwatthama entered the camp, he first kicked and awakened Dhrishtadyumna, the commander of the Pandava army and the killer of his father.
Ashwatthama strangled the half-awake Dhrishtadyumna as the prince begged to be allowed to die with a sword in his hand, ultimately choking him to death.
Even though many warriors tried to fight back, Ashwatthama remained unharmed due to his body being possessed by Shiva.
[11] Ashwatthama, believing his time had come, invoked the Brahmastra against the Pandavas from a tiny blade of grass to fulfill the oath of killing them.
[12] Ashwatthama, not knowing how, redirected the Brahmastra toward the womb of the pregnant Uttara in an attempt to end the lineage of the Pandavas.
Ashwatthama was then made to surrender the gem on his forehead and cursed by Krishna that he would roam in the forests till the end of Kali yuga with blood and pus oozing out of his injuries, and with no one to talk to.
[14] A theory is proposed by historians R. Sathianathaier and D. C. Sircar, with endorsements by Hermann Kulke, Dietmar Rothermund and Burton Stein.
[15] Sircar points out that the family legends of the Pallavas speak of an ancestor descending from Ashwatthama and his union with a Naga princess.
This claim finds support in the fact that Kanchipuram was where the Pallavas would dwell, and this was earlier a part of the Naga Kingdom.
A further corroboration is that the gotra of the Pālave Maratha family is Bharadwaja (grandfather of Ashwatthama), same as the one which Pallavas have attributed to themselves in their records.
aśvatthāmā balirvyāsō hanumāṁśca vibhīṣaṇaḥ।kṛpaḥ paraśurāmaśca saptaitai cirañjīvinaḥ॥saptaitān saṁsmarēnnityaṁ mārkaṇḍēyamathāṣṭamam।jīvēdvarṣaśataṁ sopi sarvavyādhivivarjitaḥ॥The mantra states that the remembrance of the eight immortals (Ashwatthama, Bali, Vyasa, Hanuman, Vibhishana, Kripa, Markandeya, and Parashurama) offers one freedom from ailments and longevity.