Transient receptor potential melastatin-3 (TRPM3) is a broadly expressed Ca(2+)-permeable nonselective cation channel. Previous work has demonstrated robust activation of TRPM3 by the neuroactive steroid pregnenolone sulfate (PS), but its in vivo gating mechanisms and functions remained poorly understood. Here, we provide evidence that TRPM3 functions as a chemo- and thermosensor in the somatosensory system. TRPM3 is molecularly and functionally expressed in a large subset of small-diameter sensory neurons from dorsal root and trigeminal ganglia, and mediates the aversive and nocifensive behavioral responses to PS. Moreover, we demonstrate that TRPM3 is steeply activated by heating and underlies heat sensitivity in a subset of sensory neurons. TRPM3-deficient mice exhibited clear deficits in their avoidance responses to noxious heat and in the development of inflammatory heat hyperalgesia. These experiments reveal an unanticipated role for TRPM3 as a thermosensitive nociceptor channel implicated in the detection of noxious heat.