A miscarriage of justice primarily is the conviction and punishment of a person for a crime they did not commit. The term can also apply to errors in the other direction—"errors of impunity", and to civil cases. Most criminal justice systems have some means to overturn, or "quash", a wrongful conviction, but this is often difficult to achieve. The most serious instances occur when a wrongful conviction is not overturned for several years, or until after the innocent person has been executed or died in jail.
"Miscarriage of justice" is sometimes synonymous with wrongful conviction, referring to a conviction reached in an unfair or disputed trial. Wrongful convictions are frequently cited by death penalty opponents as cause to eliminate death penalties to avoid executing innocent persons. In recent years, DNA evidence has been used to clear many people falsely convicted.
While a miscarriage of justice is a Type I error for falsely identifying culpability, an error of impunity would be a Type II error of failing to find a culpable person guilty. ---sumber wiki