1477, "in due order," from
order (q.v.). As a noun meaning "military attendant who carries orders" it is first attested 1781 (short for orderly corporal, etc.). Extended 1809 to an attendant at a hospital (originally a military hospital) charged with keeping things in order and clean.