The clean hands doctrine is a legal principle that states that a person who brings a complaint to the court, and who wants to file a lawsuit or get a court order, must not have committed any illegal acts related to the complaint. In other words, innocence and non-involvement with the wrongful act(s) is required for the court to proceed with the complaint.
The basic point of the clean hands doctrine is that a person does not have grounds to file a complaint if he or she participated in wrongdoing that's associated with the complaint in some way. For example, according to the clean hands doctrine, a person who robbed a bank would not be able to file a lawsuit against their partner in crime if said partner stole a portion of the money that they robbed from the bank.