How neural circuits drive behavior is a central question in neuroscience. Proper execution of motor behavior requires the precise coordination of many neurons. Within a motor circuit, individual neurons tend to play discrete roles by promoting or suppressing motor output. How exactly neurons function in specific roles to fine tune motor output is not well understood. In C. elegans, the interneuron RIM plays important yet complex roles in locomotion behavior. Here, we show that RIM both promotes and suppresses distinct features of locomotion behavior to fine tune motor output. This dual function is achieved via the excitation and inhibition of the same motor circuit by electrical and chemical neurotransmission, respectively. Additionally, this bi-directional regulation contributes to motor adaptation in animals placed in novel environments. Our findings reveal that individual neurons within a neural circuit may act in opposing ways to regulate circuit dynamics to fine tune behavioral output