c. 1400, medical, "course of diet, exercise, etc. for sake of health; regulation of such matters as influence health," mid-15c., "act of governing," from Old French regimen (14c.) and directly from Latin regimen "rule, guidance, government, means of guidance, rudder," from regere "to rule, to direct, keep straight, guide" (from PIE root *reg- "move in a straight line," with derivatives meaning "to direct in a straight line," thus "to lead, rule").
By 1751 in the transferred sense of "any regulation or remedy intended to produce gradual, beneficial effects." Regimen, regime, and, later, regiment (n.), all from the same Latin verb, were not always clearly distinguished in English, and as recently as late 19c. each of the first two was used even by careful writers in senses now restricted to the other.