Aggressive behavior in animals is important for survival and reproduction. It is well studied in adult insects, such as flies, ants, honey bees, and crickets. However, the larvae of Lepidopteran insects are also aggressive, studies of which are still lacking. Here, RNA-seq was used to generate a high-quality database for the aggressive behavior of Thitarodes xiaojinensis toward conspecifics and heterospecifics. Although there was similar aggressive behavior between the conspecific group and heterospecific group, significant differences were identified at the transcriptional level. When there was aggressive behavior toward conspecifics, T. xiaojinensis trended toward higher expression at the respiratory chain, while cuticle development and metabolism may have interfered. On the other hand, when there was aggressive behavior toward H. armigera, genes related to neuron and cuticle development, cellular processes, and its regulated signaling pathways were significantly upregulated, while the genes associated with oxidation-reduction and metabolism were downregulated. Weighted gene co-expression networks analysis (WGCNA) was performed, and two modules with properties correlating to the aggressive behavior of T. xiaojinensis were identified. Several hub genes were predicted and confirmed by qRT-PCR, such as CLTC, MYH, IGF2BP1, and EMC. This study provides a global view and potential key genes for the aggressive behavior of T. xiaojinensis toward conspecifics and heterospecifics. Further investigation of the hub genes would help us to better understand the aggressive behavior of insects.