Background potassium (K+) leak currents, conducted by two-pore domain K+ channels (K2P), are critical for the stabilization of the resting membrane potential and facilitate repolarization. Although K2Ps are fundamental to widespread cellular actions, the K2Ps associated with motor behavior regulation remain enigmatic. Here we show that a K2P gene
twk-40 regulates the rhythmic defecation motor program (DMP) in Caenorhabditis elegans. Indeed, disrupting TWK-40 suppresses the expulsion defects of
nlp-40 and
aex-2 mutants. By contrast, a gain-of-function (gf) mutant of
twk-40 significantly reduces the expulsion frequency per DMP cycle. Consistently, heterogenous expression of TWK-40, together with in vivo whole-cell patch clamping, demonstrate that TWK-40 forms a voltage-insensitive K+ selective channel, that regulates the resting membrane potential of the DVB neuron. In addition, we find that TWK-40 substantially contributes to the rhythmic activity of the DVB neuron. Specifically, DVB Ca2+ oscillations exhibit obvious defects in
twk-40 mutants. Expression of TWK-40(gf) in DVB recapitulates the DMP deficiency of
twk-40(gf) mutants, and inhibits DVB Ca2+ oscillations in both wild-type and
twk-40(lf) animals. Moreover, the intestinal muscles (IM), which are innervated by DVB to execute the expulsion action, also exhibit rhythm defects. IM-Ca2+ transient frequency, but not amplitude, was decreased and elevated in
twk-40(gf) and
twk-40(lf) mutants, respectively. Taken together, these results demonstrated that a K2P channel TWK-40 is essential for rhythmic motor regulation, which might provide a potential drug target for constipation.