"horizontal piece of wood in a cricket wicket," c. 1742, originally "a cross bar" of any sort (1570s), probably identical with Middle 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.

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.

"bond money, security given to obtain the release of a prisoner," late 15c., a sense that apparently developed from that of "temporary release from jail" (into the custody of another, who gives security), recorded from early 15c. That evolved from earlier meaning "captivity, custody" (early 14c.). From Old French baillier "to control, to guard, deliver" (12c.), from Latin baiulare "to bear a burden," from baiulus "porter, carrier," 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." In late 18c. criminal slang, to give leg bail meant "to run away."