Karna and Ashwatthama were both victims of loyalty towards Duryodhana, and lost the greatness that could have been accorded to them, as they both were demigods. While Karna was the son of Sun God, Ashwatthama was an incarnation of Shiva, whom Dronacharya had pleased and asked for a part of Shiva as son.
Both men were involved in adharma during the Kurushetra war: Karna in the form of killing Abhimanyu, and Ashwatthama in form of killing Upapandavas and trying to kill Uttara’s sons. Though Karna died and got relieved from the life-cycle of birth and death, Ashwatthama got cursed to roam around alone till end of Kaliyuga.
As others have answered before, both were unlucky as they got overshadowed by other warriors during their lifetime, for no fault of their own.
It would seem that Karna was unlucky during his lifetime more than Ashwatthama, but eventually with the curse, Ashwatthama trumped Karna to be unluckier in the long run.