Pit vipers possess a unique thermal sensory system consisting of facial pits that allow them to detect minute temperature fluctuations within their environments. Biologists have long attempted to elucidate the genetic basis underlying the infrared perception of pit vipers. Early studies have shown that the TRPA1 gene is the thermal sensor associated with infrared detection in pit vipers. However, whether genes other than TRPA1 are also involved in the infrared perception of pit vipers remains unknown. Here, we sequenced the whole exomes of ten snake species and performed genome-wide evolutionary analyses to search for novel candidate genes that might be involved in the infrared perception of pit vipers. We applied both branch-length-comparison and selection-pressure-alteration analyses to identify genes that specifically underwent accelerated evolution in the ancestral lineage of pit vipers. A total of 47 genes were identified. These genes were significantly enriched in the ion transmembrane transporter, stabilization of membrane potential, and temperature gating activity functional categories. The expression levels of these candidate genes in relevant nerve tissues (trigeminal ganglion, dorsal root ganglion, midbrain, and cerebrum) were also investigated in this study. We further chose one of our candidate genes, the potassium channel gene KCNK4, as an example to discuss its possible role in the infrared perception of pit vipers. Our study provides the first genome-wide survey of infrared perception-related genes in pit vipers via comparative evolutionary analyses and reveals valuable candidate genes for future functional studies.