Abstract Memory, defined as an alteration in behavior towards a stimulus that follows as a consequence of experience, arises when a sensory stimulus is encountered at the same time that the animal experiences a negative or positive internal state. How this coincident detection of external and internal stimuli stably alters responses to the external stimulus is still not fully understood, especially in the context of an intact animal. One barrier to understanding how an intact biological circuit changes is knowing what molecular processes are required to establish and maintain the memory. The optically accessible and compact nervous system of C. elegans provides a unique opportunity to examine these processes. C. elegans can remember an odor such as butanone when it is paired with a single negative experience and the transient receptor potential (TRP) OSM-9/TRPV5/TRPV6 channel is known to be required for this memory. The multiple gating mechanisms of TRPV channels give them the potential to be the coincidence detectors required to integrate internal state and external stimuli. Here, we report that this TRPV channel is also required for acquisition and possibly consolidation of sleep-dependent, long-term memory of butanone. We find that in the anterior ganglion, endogenous GFP-tagged OSM-9 is expressed in the paired AWA olfactory neurons, the ASH nociceptive neuron pair, the mechanosensory OLQ tetrad, and the paired ADF and ADL sensory neurons. In these cells, OSM-9 protein is concentrated in the sensory endings, dendrites, and cell bodies, but excluded from the neurites in the nerve ring. In the tail, OSM-9 is expressed in the nociceptive phasmid neurons PHA and PHB, possibly PQR as well as PVP. In the midbody, it is possibly expressed in the mechanosensitive PVD neuron. It is notably absent from the AWC pair that are required for butanone attraction. Chronic loss of OSM-9 in a subset of ciliated neurons that do not include AWA interferes with consolidation but not learning. Because OSM-9 is expressed and required in sensory neurons that are not needed for butanone chemosensory behavior, two interpretations are possible. The first, is that OSM-9 loss leads to gain of function or neomorphic behavior of these cells that are extrinsic to the primary sensory circuit and their new activity interferes with acquisition and consolidation of memory. The second is that loss of OSM-9 leads to a loss of function phenotype in which the wild type function of these cells is diminished and this function is required for memory consolidation. Author summary How organisms learn from their environment and keep these memories for the long term ensures their survival. There is much known about the regions of the brain and the various proteins that are essential for memory, yet the exact molecular mechanisms and dynamics required are not known. We aimed to understand the genetics that underlie memory formation. We tested a gene that encodes a transient potential receptor channel vanilloid channel, which is similar to the channels we have that sense spicy foods and other harmful cues. Our studies have shown that this gene is required for the animal to be able to acquire and perhaps consolidate olfactory memory. This protein is not expressed in the sensory neurons that respond to the odor that is memorized or in other downstream interneurons in the odor-sensation circuit, but it is expressed in a distinct set of sensory neurons. This indicates that long-term memory involves wild type behavior of a wider array of sensory neurons than is required for the primary sensation. These channels are also implicated in neurological disorders where memory is affected, including Alzheimer’s disease. Understanding how memory formation is affected by cells outside the memory circuit might provide testable hypothesis about what goes awry in Alzheimer’s disease.