1940s, "masturbator," British slang, from wank "to masturbate," of unknown origin. General sense of "contemptible person" is attested from 1972. Compare sense evolution of jerk (n.).
Entries linking to wanker
jerk v.1
"to pull with sudden energy," 1580s; earlier "to lash, strike as with a whip" (1540s, surviving only in dialect), of uncertain origin, perhaps echoic. Intransitive sense of "make a sudden spasmodic motion" is from c. 1600. Compare Middle English yerkid, an adjective apparently meaning "pulled tight" (early 15c.), which has the form of a past participle. Also compare Middle English ferken "move hastily; drive (something) forward," from Old English fercian "to proceed." Related: Jerked; jerking.
wonk n.
"overly studious person," 1962, earlier "effeminate male" (1954), American English student slang. Perhaps a shortening of British slang wonky "shaky, unreliable," or a variant of British slang wanker "masturbator." It seemed to rise into currency as a synonym for nerd late 1980s from Ivy League slang and was widely popularized 1993 during the presidency of Bill Clinton. Tom Wolfe (1988) described it as "an Eastern prep-school term referring to all those who do not have the 'honk' voice, i.e., all who are non-aristocratic."