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.
The sense was gradually restricted in Low German, Scandinavian, and English to the most important of the forest produce for feeding swine: the mast of the oak tree. The regular modern form would be *akern; the current spelling emerged 15c.-16c. by folk etymology association with oak (Old English ac) and corn (n.1), neither of which has anything to do with it. Acorn squash is attested by 1937.