Antheraea pernyi (Guérin-Méneville 1855) is an important resource for silk, food, and biohealth products; however, exogenous pathogens largely affect the commercial application potential of this species. Since the gut is a key organ for the digestion and absorption of nutrients as well as for immune defense, we used comparative transcriptome analysis to screen for a gut-specific molecular tool for further functional research in A. pernyi. In total, 3,331 differentially expressed genes (DEGs) were identified in the gut compared with all other pooled tissues of A. pernyi, including 1,463 upregulated genes in the gut. Among these, we further focused on a lipopolysaccharide-induced tumor necrosis factor-α factor (LITAF) gene because of its high gut-specific expression and the presence of a highly conserved SIMPLE-like domain, which is related to the immune response to pathogenic infections in many species. The cDNA sequence of ApLITAF was 447-bp long and contained a 243-bp open reading frame encoding an 80-amino acid protein. Immune challenge assays indicated that ApLITAF expression was significantly upregulated in the gut of A. pernyi naturally infected with nucleopolyhedrovirus (NPV) or fed leaves infected with the gram-negative bacterium Escherichia coli (Migula 1895) and the gram-positive bacterium Bacillus subtilis (Ehrenberg 1835). Cell transfection showed that ApLITAF localized to the lysosome. Collectively, these results suggested that ApLITAF played a role in the immune response of A. pernyi and could facilitate the future research and breeding application in this species.