Story behind Upa Pandavas killing by Aswathama

The sage Viswamitra decided to test if king Harischandra really deserved his reputation as a most truthful king. He managed to trick the king into giving up his Kingdom and everything in it, including his clothes and ornaments and forced the king to leave, along with his Queen and son. the sage actually beat the queen to push them out of the kingdom. The five guardian deities of the kingdom were enraged by this and condemned the Sage. The sage became enraged and cursed them to be born as mortals. Once they begged Viswamitra's pardon, the sage revised his curse, saying that though they would be re-born as mortals, they would get their moksha before forming any attachments that would reduce their status and sanctity as guardian deities.

And hence, the guardians were born as the sons of Draupadi, ( The names of the five sons of Draupadi were thus - Prathivindya, Srutasoma, Sruthakeerthi, Sataaneekaa,Sruthasena) who were killed before they were old enough to earn a name or marry and have any progeny of their own. Their souls attained relief from Sage Viswamitra's curse, while their murderer Aswathama - not content with having killed the five Upa-Pandavas as they were known, decided to summon the Brahmastra and tried to kill the son of Abhimanyu in Uttara's womb.The baby was saved by Lord Krishna and He cursed Aswathama to always roam the lands without attaining moksha.