"drive (something) away by violent blows," 1640s, from beat (v.) + off (adv.). The meaning "masturbate" is recorded by 1960s.
Entries linking to beat off
beat v.
Old English beatan "inflict blows on, strike repeatedly, thrash" (class VII strong verb; past tense beot, past participle beaten), from Proto-Germanic *bautan (source also of Old Norse bauta, Old High German bozan "to beat"), from PIE root *bhau- "to strike."
Past tense form beat is from c. 1500, probably not from Old English but a shortening of Middle English beted. Of the heart, c. 1200, from notion of it striking against the breast.
The meaning "overcome in a contest" is from 1610s (hence the sense of "legally avoid, escape" in beat the charges, etc., attested from c. 1920 in underworld slang). The sense of "be too difficult for" intellectually or physically (by 1870) is behind the shrug-phrase beats me.
The meaning "strike cover to rouse or drive game" (c. 1400) is the source of beat around (or about) the bush (1570s), the metaphoric sense of which has shifted from "make preliminary motions" to "avoid, evade." The nautical sense of "make progress against the wind by means of alternate tacks" is from 1670s. Command beat it "go away" is recorded by 1906 (though "action of feet upon the ground" was a sense of Old English betan); it is attested in 1903 as newsboy slang for "travel without paying by riding on the outside of a train."
off prep., adv.
by c. 1200 as an emphatic form of Old English of (see of), employed in the adverbial use of that word. The prepositional meaning "away from" and the adjectival sense of "farther" were not firmly fixed in this variant until 17c., but once they were they left the original of with the transferred and weakened senses of the word. Meaning "not working" is from 1861.
Off the cuff "extemporaneously, without preparation" (1938) is from the notion of speaking from notes written in haste on one's shirt cuffs. In reference to clothing, off the rack (adj.) "not tailored, not made to individual requirements, ready-made" is by 1963, on the notion of buying it from the rack of a clothing store; off the record "not to be publicly disclosed" is from 1933; off the wall "crazy" is 1968, probably from the notion of a lunatic "bouncing off the walls" or else in reference to carom shots in squash, handball, etc.