Persistent neural activity, a sustained circuit output that outlasts the stimuli, underlies short-term or working memory, as well as various mental representations. Molecular mechanisms that underlie persistent activity are not well understood. Combining in situ whole-cell patch clamping and quantitative locomotion analyses, we show here that the Caenorhabditis elegans neuromuscular system exhibits persistent rhythmic activity, and such an activity contributes to the sustainability of basal locomotion, and the maintenance of acceleration after stimulation. The NALCN family sodium leak channel regulates the resting membrane potential and excitability of invertebrate and vertebrate neurons. Our molecular genetics and electrophysiology analyses show that the C. elegans NALCN, NCA, activates a premotor interneuron network to potentiate persistent motor circuit activity and to sustain C. elegans locomotion. Collectively, these results reveal a mechanism for, and physiological function of, persistent neural activity using a simple animal model, providing potential mechanistic clues for working memory in other systems.