poetic justice

US /ˌpoʊˌet.ɪk ˈdʒʌs.tɪs/
UK /ˌpoʊˌet.ɪk ˈdʒʌs.tɪs/
"poetic justice" picture
1.

an outcome in which vice is punished and virtue rewarded, usually in a manner peculiarly or ironically appropriate.

:
It was poetic justice when the corrupt politician was arrested for bribery.
After years of cheating, his failure felt like poetic justice.