If something's not fair, or especially if it's illegal, you can call it wrongful. If a company violates an employee's contract and fires her, that would be a wrongful termination.
This adjective is mainly used in a legal context. Being arrested when there's no evidence is a wrongful arrest, and if you're found guilty of a crime you didn't commit, that would be a wrongful conviction. We've used this word since the 14th century to mean "not fair" or "unjust." It derives from an Old English word meaning "crooked or twisted."