Comeuppance describes a fate or punishment that's deserved, like an arrogant trash-talking quarterback who fumbles the ball on the last play and loses the game for his team.
Comeuppance began as a term that meant "present oneself for judgment by a tribunal." That was in 1859. You can picture an accused person approaching a judge, or "coming up" to the front of a courtroom. Guilt, innocence — comeuppance can be either, and it can apply to things beyond the justice system. Nowadays you'll most likely hear this word describe something bad. If someone gets a deserved punishment, you'd say "He got his comeuppance."