mid-14c., "condition of being in active operation; practice for the sake of training," from Old French exercice (13c.) "exercise, execution of power; physical or spiritual exercise," from Latin exercitium "training, exercise" (of soldiers, horsemen, etc.); "play;" in Medieval Latin also of arts, from exercitare, frequentative of exercere "keep busy, keep at work, oversee, engage busily; train, exercise; practice, follow; carry into effect; disturb, disquiet," literally "remove restraint," from ex- "off" (see ex-) + arcere "keep away, prevent, enclose," from PIE *ark- "to hold, contain, guard" (see arcane).
Original sense may have been driving farm animals to the field to plow. Meaning "physical activity for fitness, etc." first recorded in English late 14c. Also from late 14c. as "a carrying out of an action; a doing or practicing; a disciplinary task." In reference to written schoolwork from early 17c. The ending was abstracted for formations such as dancercise (1967); jazzercise (1977); and boxercise (1985).