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.).
wang
wangle
waning
wank
Wankel
wanker
wanna
wannabe
want
wanted
wanting