A miscarriage of justice, also known as a failure of justice, occurs when a person is convicted and punished for a crime that he or she did not commit.