ref
From mess + -y.
messy (adj.)
1843, "untidy, in a state of disorder or dirtiness," from mess (n.) "state of confusion" + -y (2). Figurative use ("unethical") is attested by 1924. Related: Messily; messiness.