Hydrogen sulfide (H2S) can act as an energy source, a poison and a gasotransmitter in organisms. We used the robust locomotory responses to H2S inCaenorhabditis elegansto delineate the molecular mechanisms governing sensory and adaptive responses to H2S exposure. We found thatC. elegansexhibited transiently increased locomotory activity and turning behavior as a strategy to escape the noxious H2S stimulation. The behavioral responses to H2S were modulated by a complex network of signaling pathways, including cyclic GMP signaling in ciliated sensory neurons, calcineurin, nuclear hormone receptors, to the major starvation regulators such as insulin and TGF-β signaling. The response to H2S was substantially affected by the ambient O2levels and their prior experience in low O2environments, suggesting an intricate interplay between O2and H2S sensing mechanisms. Prolonged exposure to H2S robustly evoked H2S detoxification coupled with reduced locomotory response to the subsequent H2S challenges. Intriguingly, the expression of genes involved in iron homeostasis, includingftn-1andsmf-3, was substantially modified in exposure to H2S, implying that labile iron levels are affected by H2S. In support of this, iron supplement significantly bolstered the behavioral response to H2S. In addition, mitochondria, one of the central hubs for H2S metabolism, played a crucial role in adaptive responses to H2S. In summary, our study provides molecular insights into the mechanisms through whichC. elegansdetects, modulates, and adapts its response to H2S.