1530s, of armies, "to retreat," from Middle French retirer "to withdraw (something)," from re- "back" (see re-) + Old French tirer "to draw" (see tirade). Related: Retired; retiring.
Meaning "to withdraw" to some place, especially for the sake of privacy, is recorded from 1530s; sense of "leave an occupation" first attested 1640s (implied in retirement). Meaning "to leave company and go to bed" is from 1660s. Transitive sense is from 1540s, originally "withdraw, lead back" (troops, etc.); meaning "to remove from active service" is from 1680s. Baseball sense of "to put out" is recorded from 1874.