Old English hoc "hook, angle," perhaps related to Old English haca "bolt," from Proto-Germanic *hokaz/*hakan- (cf. Old Frisian hok, Middle Dutch hoek, Dutch haak, German Haken "hook"), from PIE *keg- "hook, tooth" (cf. Russian kogot "claw"). For spelling, see hood (n.1).
Boxing sense of "short, swinging blow with the elbow bent" is from 1898. Figurative sense was in Middle English (see hooker). By hook or by crook (late 14c.) probably alludes to tools of professional thieves. Hook, line, and sinker "completely" is 1838, a metaphor from angling.
By whatever means possible, fair or unfair: “Polly was determined to get an A on the exam by hook or by crook.”