How the nervous system controls the sensation and memory of information from the environment is an essential question. The nematode Caenorhabditis elegans is a useful model for elucidating neural information processing that mediates sensation and memory. The entire nervous system of C. elegans consists of only 302 neurons, and their wiring diagram has been revealed by electron microscopy analysis. Here, we review the molecular and physiological mechanisms responsible for the neural circuit-mediated temperature-seeking behavior (thermotaxis) in C. elegans. Recent molecular biology studies and optogenetic analyses, such as the optical manipulation of neural activity, and neural imaging have revealed the novel concept of neural calculation. Most significantly, trimetric G proteincoupled thermosensation, single sensory neuron-based memory, and the orchestrated synaptic transmission system have been elucidated.