1474, probably a fusion of M.E. scratten and crachen, both meaning "to scratch," both of uncertain origin. The noun is attested from 1586; slang sense of "money" is from 1914, of uncertain signification. Many figurative senses (e.g. up to scratch) are from sporting use for "line or mark drawn as a starting place," attested from 1778 (but the earliest use is figurative); meaning "nothing" (in from scratch) is 1922, also from sporting sense of "starting point of a competitor who receives no odds in a handicap match." Billiards sense of "to hit the cue ball into a pocket" is first recorded 1909 (also, originally, itch), though earlier it meant "a lucky shot" (1850). Verb meaning "to withdraw (a horse) from a race" is 1865, from notion of scratching name off list of competitors; used in a non-sporting sense of "cancel a plan, etc." from 1685.
in Old Scratch "the Devil," 1740, is from earlier Scrat, from O.N. skratte "goblin, monster," a word which was used in late O.E. for "hermaphrodite" (cf. O.H.G. scrato "satyr, wood demon").