In jurisprudence, prosecutorial misconduct is a procedural defense; via which, a defendant may argue that they should not be held criminally liable for actions which may have broken the law, because the prosecution acted in an "inappropriate" or "unfair" manner. Such arguments may involve allegations that the prosecution withheld evidence or knowingly permitted false testimony. This is similar to selective prosecution.
Read more about Prosecutorial Misconduct: Some Examples and Remedies, Types of Misconduct, Abuses of Discretion