Many sources have been suggested for the Americanism “Shenanigan”, which seems to have been originated in California during or soon after the Gold Rush.
The first recorded use was in that state in 1855.
As the word has the sense of “trickery, deceit,” most possible sources suggested have had similar meanings, such as the Spanish chanada, “a trick,” and the Irish sionnachuighim, “I play tricks.”
However, despite the fact that, as Mencken remarks, the word has “an Irish smack,” a very strong case is made by Spitzer (American Speech, Vol. 23, 1948 p. 210) for a derivation from the German schinnagel, “the nail holding the rim to the wheel,” through the cant word schinageln, “to work,” and Schenigelei, “a trick.”