get one's hands dirty or
soil one's hands. Do something shameful or illegal. For example, He refused to dirty his hands and give jobs to the big campaign donors, or Getting one's hands dirty by lying to the boss will be severely punished, or She would not soil her hands by cheating. This expression is a metaphor for literally defiling or soiling oneself.