early 14c., curfeu, "evening signal, ringing of a bell at a fixed hour" as a signal to extinguish fires and lights, from Anglo-French coeverfu (late 13c.), from Old French cuevrefeu, literally "cover fire" (Modern French couvre-feu), from cuevre, imperative of covrir "to cover" (see cover (v.)) + feu "fire" (see focus (n.)). Related: Curfew-bell (early 14c.).
The medieval practice of ringing a bell (usually at 8 or 9 p.m.) as an order to bank the hearths and prepare for sleep was to prevent conflagrations from untended fires. The modern extended sense of "periodic restriction of movement" had evolved by 1800s.