Behavioral persistency reflects internal brain states, which are the foundations of multiple brain functions. However, experimental paradigms that enable genetic analyses of behavioral persistency and its associated brain functions have been limited. Here we report novel persistent behavioral responses caused by electric stimuli in the nematode Caenorhabditis elegans . When the animals on bacterial food are stimulated by alternating current, their movement speed suddenly increases more than 2-fold, which persists for minutes even after the electric stimulation is terminated. Genetic analyses reveal that multiple types of voltage-gated channels are required for the response, possibly as the sensors, and neuropeptide signaling regulates the duration of the persistent response. Additional behavioral analyses indicate that the animal’s response to electric shock is scalable and has a negative valence. These properties, along with persistence, have been recently regarded as essential features of emotion, suggesting that the animal’s response to electric shock may express a form of emotion, such as fear.