Ascaris suum eggs are inactivated by composting conditions; however, it is difficult to find functional changes in heat-treated A. suum eggs. Here, unembryonated A. suum eggs were incubated at $20^{circ}C$, $50^{circ}C$, and $70^{circ}C$ in vitro, and the gene expression levels related to viability, such as eukaryotic translation initiation factor 4E (IF4E), phosphofructokinase 1 (PFK1), and thioredoxin 1 (TRX1), and to apoptosis, such as apoptosis-inducing factor 1 (AIF1) and cell death protein 6 (CDP6), were evaluated by real-time quantitative RT-PCR. No prominent morphological alterations were noted in the eggs at $20^{circ}C$ until day 10. In contrast, the eggs developed rapidly, and embryonated eggs and hatched larvae began to die, starting on day 2 at $50^{circ}C$ and day 1 at $70^{circ}C$. At $20^{circ}C$, IF4E, PFK1, and TRX1 mRNA expression was significantly increased from days 2-4; however, AIF1 and CDP6 mRNA expression was not changed significantly. IF4E, PFK1, and TRX1 mRNA expression was markedly decreased from day 2 at $50^{circ}C$ and $70^{circ}C$, whereas AIF1 and CDP6 mRNA expression was significantly increased. The expressions of HSP70 and HSP90 were detected for 9-10 days at $20^{circ}C$, for 3-5 days at $50^{circ}C$, and for 2 days at $70^{circ}C$. Taken together, incremental heat increases were associated with the rapid development of A. suum eggs, decreased expression of genes related to viability, and earlier expression of apoptosis-related genes, and finally these changes of viability- and apoptosis-related genes of A. suum eggs were associated with survival of the eggs under temperature stress.