"bond money, security given to obtain the release of a prisoner," late 15c., a sense that apparently developed from that of "temporary release (of an arrested person) from jail" (into the custody of another, who gives security for future appearance at trial), which is recorded from early 15c. That seems to have evolved from the earlier meanings "captivity, custody" (late 14c.), "charge, guardianship" (early 14c.).
The word is from Old French baillier "to control, to guard, deliver" (12c.), from Latin baiulare "to bear a burden," from baiulus "porter, carrier, one who bears burdens (for pay)," which is of uncertain origin; perhaps a borrowing from Germanic and cognate with the root of English pack, or perhaps from Celtic. De Vaan writes that, in either case, "PIE origin seems unlikely."
To go to(or in) bail "be released on bail" is attested from mid-15c. In late 18c. criminal slang, to give leg bail meant "to run away."
To bail out "leave suddenly" (intransitive) is recorded from 1930, originally of airplane pilots. Perhaps there is some influence from bail (v.2) "procure (someone's) release from prison." Related: Bailed; bailing.
"horizontal piece of wood in a cricket wicket," c. 1742, originally "a cross bar" of any sort (1570s), probably identical with French bail "horizontal piece of wood affixed on two stakes," and with English bail "palisade wall, outer wall of a castle" (see bailey). From 1904 as the hinged bar which holds the paper against the platen of a typewriter.
Middle English baylle, "wall enclosing an outer court" of a castle, fortified city, etc. (c. 1200 in Anglo-Latin, late 13c. in place-names), a variant of bail, from Old French bail "stake, palisade, brace," which is of unknown origin, perhaps ultimately connected to Latin bacula "sticks," on notion of "stakes, palisade fence."
The word was extended to mean the outer court itself (early 14c.). Hence Old Bailey, seat of Central Criminal Court in London, so called because it stood within the ancient bailey of the city wall. The surname Bailey usually is from Old French bailli, a later form of baillif (see bailiff). Bailey's, the Irish whiskey- and cream-based liqueur, was introduced in 1974 and said to have been named for the historic Bailey's Hotel in London.
Old English borgian "to lend, be surety for," from Proto-Germanic *burg- "pledge" (source also of Old English borg "pledge, security, bail, debt," Old Frisian borgia "borrow, take up money," Old Norse borga "to become bail for, guarantee," Middle Dutch borghen "to protect, guarantee," Old High German boragen "to beware of," German borgen "to borrow; to lend"), which is, according to Watkins, from PIE root *bhergh- (1) "to hide, protect."
Sense shifted in Old English to the modern one, "take or obtain (something) on pledge to return it or security given," apparently on the notion of collateral deposited as security for something borrowed. Figurative use from early 13c. As an operation in subtraction, 1590s. Related: Borrowed; borrowing. Phrase borrowed time is from 1848.
mid-14c., plegge, "surety, bail," from Old French plege (Modern French pleige) "hostage, security, bail," also Anglo-Latin plegium, both probably from Frankish *plegan "to guarantee," from *pleg-, a West Germanic root meaning "have responsibility for" (source also of Old Saxon plegan "vouch for," Middle Dutch plien "to answer for, guarantee," Old High German pflegan "to care for, be accustomed to," Old English pleon "to risk the loss of, expose to danger"), from PIE root *dlegh- "to engage oneself, be or become fixed" [Watkins].
From late 14c. as "person who goes surety or gives bail for another;" late 15c. (Caxton) as "personal property given as surety for a debt or engagement. By 1520s as "a token or sign of favor, agreement, etc.
Meaning "allegiance vow attested by drinking with another" is from 1630s. Sense of "solemn promise, one's word given or considered as security for the performance (or refraining from) an act" is recorded by 1814, though this notion is from 16c. in the verb. Weekley notes the "curious contradiction" in pledge (v.) "to toast with a drink" (1540s) and pledge (n.) "the vow to abstain from drinking" (1833). Meaning "student who has agreed to join a fraternity or sorority" dates from 1901.