A wide variety of cells are generated by the expression of characteristic sets of genes, primarily those regulated by cell-specific transcription. To elucidate the mechanism regulating cell-specific gene expression in a highly specialized cell, AFD thermosensory neuron in Caenorhabditis elegans, we analyzed the promoter sequences of guanylyl cyclase genes,
gcy-8 and
gcy-18, exclusively expressed in AFD. In this study, we showed that AFD-specific expression of
gcy-8 and
gcy-18 requires the co-expression of homeodomain proteins, CEH-14/LHX3 and TTX-1/OTX1. We observed that mutation of
ttx-1 or
ceh-14 caused a reduction in the expression of
gcy-8 and
gcy-18 and that the expression was completely lost in double mutants. This synergy effect was also observed with other AFD marker genes, such as
ntc-1,
nlp-21and cng-3. Electrophoretic mobility shift assays revealed direct interaction of CEH-14 and TTX-1 proteins with
gcy-8 and
gcy-18 promoters in vitro. The binding sites of CEH-14 and TTX-1 proteins were confirmed to be essential for AFD-specific expression of
gcy-8 and
gcy-18 in vivo. We also demonstrated that forced expression of CEH-14 and TTX-1 in AWB chemosensory neurons induced ectopic expression of
gcy-8 and
gcy-18 reporters in this neuron. Finally, we showed that the regulation of
gcy-8 and
gcy-18 expression by
ceh-14 and
ttx-1 is evolutionally conserved in five Caenorhabditis species. Taken together,
ceh-14 and
ttx-1 expression determines the fate of AFD as terminal selector genes at the final step of cell specification.