"to cut in quarters, divide into four equal parts," mid-14c., from quarter (n.1). From late 14c. specifically as the word for a form of criminal punishment (Old English had slitcwealm "death by rending"). Related: Quartered; quartering. Middle English also had a verb quartle "to divide into four parts" (late 14c.).
The meaning "furnish with lodgings, shelter, etc. as a temporary means of living" is recorded from 1590s (see quarters), often specifically "to put up soldiers" under orders from authority.
Old armies spent winters in quarters and took to the "open field" to seek battle in summer. Generalized to "continued or sustained aggressive operations for the accomplishment of some purpose" (1790); in U.S., especially "political activity before an election, marked by organized action in influencing the voters" [DAE], attested from 1809.
"A coarse cotton stuff, generally blue, worn by sailors" [Century Dictionary, 1897], 1610s, dongerijns, from Hindi dungri "coarse calico," said to be from the name of a village, now one of the quarters of Bombay. Dungarees "trousers made of dungaree" is by 1868.
"military attendant who carries orders," 1781, short for orderly corporal, etc. Extended 1809 to an attendant at a hospital (originally a military hospital) charged with keeping things clean and in order, from orderly (adj.) in the military sense of "of or pertaining to communication or execution of orders" (1723).
"military helicopter for taking wounded soldiers to a hospital," 1966, U.S. military, formed from elements of medical evacuation.