The Americanism “shyster” was probably coined early in the nineteenth century, since its first recorded use, as cited in the Dictionary of American English, was in 1846.
Partridge, in his Dictionary of Slang and Unconventional English, suggests that shyster is a variant of shicer, “a person or thing of no account, worthless,” although the latter may actually be the newer word.
In any event, there is some reason to believe that both are derived from the German (possibly through Yiddish) Scheisse, “excrement.”