"Tragic irony" is a phrase used to describe a situation in which something unfortunate happens in a way that is unexpected or contradictory, often with a sense of irony or contradiction. It's a combination of tragedy (serious or sad events) and irony (something happening in a way that is opposite to what was expected or intended).
Full definition