Responses to environmental stimuli are mediated by the activation and inactivation of various signalling proteins. However, the temporal dynamics of these events in living animals are not well understood. Here we show real-time imaging of the activity of the key regulator of the MAP kinase pathway, Ras, in living Caenorhabditis elegans and that Ras is transiently activated within a few seconds in olfactory neurons in response to increase in the concentration of odorants. This fast activation of Ras is dependent on the olfactory signalling pathway and Ras guanyl nucleotide-releasing protein (RasGRP). A negative feedback loop then quickly leads to Ras inactivation despite the continued presence of the odorant. Phenotypes of Ras mutants suggest this rapid activation and inactivation of Ras is important for regulation of interneuron activities and olfactory behaviours. Our results reveal novel kinetics and biological implication of transient activation of Ras in olfactory systems.