Animals from diverse phyla possess neurons that are activated by the product of aerobic respiration, CO2. It has long been thought that such neurons primarily detect the CO2 metabolites protons and bicarbonate. We have determined the chemical tuning of isolated CO2 chemosensory BAG neurons of the nematode Caenorhabditis elegans. We show that BAG neurons are principally tuned to detect molecular CO2, although they can be activated by acid stimuli. One component of the BAG transduction pathway, the receptor-type guanylate cyclase GCY-9, suffices to confer cellular sensitivity to both molecular CO2 and acid, indicating that it is a bifunctional chemoreceptor. We speculate that in other animals, receptors similarly capable of detecting molecular CO2 might mediate effects of CO2 on neural circuits and behavior.