The neurotransmitter gamma-aminobutyric acid (GABA) is depolarizing in the developing vertebrate brain, but in older animals switches to hyperpolarizing and becomes the major inhibitory neurotransmitter in adults. We discovered a similar developmental switch in GABA response in Caenorhabditis elegans and have genetically analyzed its mechanism and function in a well-defined circuit. Worm GABA neurons innervate body wall muscles to control locomotion. Activation of GABAA receptors with their agonist muscimol in newly hatched first larval (L1) stage animals excites muscle contraction and thus is depolarizing. At the mid-L1 stage, as the GABAergic neurons rewire onto their mature muscle targets, muscimol shifts to relaxing muscles and thus has switched to hyperpolarizing. This muscimol response switch depends on chloride transporters in the muscles analogous to those that control GABA response in mammalian neurons: the chloride accumulator sodium-potassium-chloride-cotransporter-1 (NKCC-1) is required for the early depolarizing muscimol response, while the two chloride extruders potassium-chloride-cotransporter-2 (KCC-2) and anion-bicarbonate-transporter-1 (ABTS-1) are required for the later hyperpolarizing response. Using mutations that disrupt GABA signaling, we found that neural circuit development still proceeds to completion but with an ∼6-hr delay. Using optogenetic activation of GABAergic neurons, we found that endogenous GABAA signaling in early L1 animals, although presumably depolarizing, does not cause an excitatory response. Thus a developmental depolarizing-to-hyperpolarizing shift is an ancient conserved feature of GABA signaling, but existing theories for why this shift occurs appear inadequate to explain its function upon rigorous genetic analysis of a well-defined neural circuit.