To identify molecular mechanisms that function in G-protein signaling, we have performed molecular genetic studies of a simple behavior of the nematode Caenorhabditis elegans, egg laying, which is driven by a pair of serotonergic neurons, the hermaphrodite-specific neurons (HSNs). The activity of the HSNs is regulated by the G(o)-coupled receptor EGL-6, which mediates inhibition of the HSNs by neuropeptides. We report here that this inhibition requires one of three inwardly rectifying K(+) channels encoded by the C. elegans genome: IRK-1. Using ChannelRhodopsin-2-mediated stimulation of HSNs, we observed roles for egl-6 and irk-1 in regulating the excitability of HSNs. Although irk-1 is required for inhibition of HSNs by EGL-6 signaling, we found that other G(o) signaling pathways that inhibit HSNs involve irk-1 little or not at all. These findings suggest that the neuropeptide receptor EGL-6 regulates the potassium channel IRK-1 via a dedicated pool of G(o) not involved in other G(o)-mediated signaling. We conclude that G-protein-coupled receptors that signal through the same G-protein in the same cell might activate distinct effectors and that specific coupling of a G-protein-coupled receptor to its effectors can be determined by factors other than its associated G-proteins.