ThermoTRPs, a subset of the Transient Receptor Potential (TRP) family of cation channels, have been implicated in sensing temperature. TRPM8 and TRPA1 are both activated by cooling; however, it is unclear whether either ion channel is required for thermosensation in vivo. We show that mice lacking TRPM8 have severe behavioral deficits in response to cold stimuli. In thermotaxis assays of temperature gradient and two-temperature choice assays, TRPM8-deficient mice exhibit strikingly reduced avoidance of cold temperatures. TRPM8-deficient mice also lack behavioral response to cold-inducing icilin application and display an attenuated response to acetone, an unpleasant cold stimulus. However, TRPM8-deficient mice have normal nociceptive-like responses to subzero centigrade temperatures, suggesting the presence of at least one additional noxious cold receptor. Finally, we show that TRPM8 mediates the analgesic effect of moderate cooling after administration of formalin, a painful stimulus. Therefore, depending on context, TRPM8 contributes to sensing unpleasant cold stimuli or mediating the effects of cold analgesia.