Cottonseed protein concentrate (CPC) is a new non-food protein source with high crude protein, low price, and abundant resources, making it an ideal substitute for fishmeal. In this study, we investigated the effects of CPC re placing fishmeal on the immune response of Litopenaeus vannamei using transcriptome sequencing. L. vannamei (initial body weight: 0.42 ± 0.01 g) were fed four isonitrogenous and isolipid feeds for eight weeks, with CPC replacing fishmeal at 0% (control, FM), 15% (CPC15), 30% (CPC30), and 45% (CPC45), respectively. At the end of the feeding trial, the changes of the activities and expression of immune-related enzymes were consistent in L. vannamei in the CPC-containing group when compared with the FM group. Among them, the activities of ACP, PO, and LZM in the group whose diet was CPC30 were significantly higher than those in the FM group. Moreover, the activities of AKP, SOD, and CAT were significantly higher in the group containing CPC than in the FM group. Furthermore, all CPC groups had considerably lower MDA levels than the FM group. This suggests that the substitution of fishmeal with CPC leads to a significant immune response in L. vannamei. Compared with the FM group, transcriptome analysis identified 805 differentially expressed genes (DEGs) (484 down and 321 up), 694 (266 down and 383 up), and 902 (434 down and 468 up) in CPC15, CPC30, and CPC45, respectively. Among all DEGs, 121 DEGs were shared among different CPC-containing groups compared with the FM group. Most of these differential genes are involved in immune-related signaling pathways. The top 20 signaling pathways enriched for differential genes contained toxoplasmosis, pathogenic Escherichia coli infection, insulin resistance, and Toll and immune deficiency (IMD) pathways, in which NF-kappa-B inhibitor Cactus were involved. In addition, trend analysis comparison of the DEGs shared by the group with CPC in the diet and the FM group showed that Cactus genes were significantly down-regulated in the group with CPC in the diet and were lowest in the CPC30 group. Consistently, the expression of antimicrobial peptide genes was significantly higher in both diet-containing CPC groups than in the FM group. In conclusion, the moderate amount of CPC substituted for fishmeal may improve the immunity of L. vannamei by suppressing the expression of Cactus genes, thereby increasing the expression of antimicrobial peptide (AMP) genes.