Polymodal nociceptors detect noxious stimuli, including harsh touch, toxic chemicals and extremes of heat and cold. The molecular mechanisms by which nociceptors are able to sense multiple qualitatively distinct stimuli are not well understood. We found that the C. elegans PVD neurons are mulitidendritic nociceptors that respond to harsh touch and cold temperatures. The harsh touch modality specifically required the DEG/ENaC proteins MEC-10 and DEGT-1, which represent putative components of a harsh touch mechanotransduction complex. In contrast, responses to cold required the TRPA-1 channel and were MEC-10 and DEGT-1 independent. Heterologous expression of C. elegans TRPA-1 conferred cold responsiveness to other C. elegans neurons and to mammalian cells, indicating that TRPA-1 is a cold sensor. Our results suggest that C. elegans nociceptors respond to thermal and mechanical stimuli using distinct sets of molecules and identify DEG/ENaC channels as potential receptors for mechanical pain.