Adaption to cold temperatures, especially those below freezing, is essential for animal survival in cold environments. Freezing is also used for many medical, scientific, and industrial purposes. Natural freezing survival in animals has been extensively studied. However, the underlying mechanisms remain unclear. Previous studies demonstrated that animals survive in extremely cold weather by avoiding freezing or controlling the rate of ice-crystal formation in their bodies, which indicates that freezing survival is a passive thermodynamic process. Here, we showed that genetic programming actively promotes freezing survival in Caenorhabditis elegans. We found that daf-2, an insulin/IGF-1 receptor homologue, and loss-of-function enhanced survival during freeze-thaw stress, which required the transcription factor daf-16/FOXO and age-independent target genes. In particular, the freeze-thaw resistance of daf-2(rf) is highly allele-specific and has no correlation with lifespan, dauer formation, or hypoxia stress resistance. Our results reveal a new function for daf-2 signaling, and, most importantly, demonstrate that genetic programming contributes to freezing survival.