ResultsA total of 10 phyla, 16 classes, 47 orders, 72 families, 103 genera, and 135 species were obtained by using a 97% similarity cutoff level. The dominant bacterial phyla in the gut of the L. dispar larvae are Firmicutes and Proteobacteria. The treatment with carvacrol can significantly affect the structure of gut bacteria in the larvae of the L. dispar. At both doses, carvacrol can shift the dominant gut bacteria of the larvae from Proteobacteria to Firmicutes. At the genus level, two doses of carvacrol can significantly enhance the relative abundance of probiotic Lactobacillus in the gut of L. dispar larvae (p ≤ 0.01). Additionally, significant differences were observed among the five bacterial genera Burkholderia-Caballeronia-Paraburkholderia, Anoxybacillus, Pelomonas, Mesorhizobium (p ≤ 0.05). The analysis of α-diversity and β-diversity indicates that the treatment with carvacrol at two doses significantly affect the bacterial richness and diversity in the larvae. However, the results of functional classification prediction (PICRUSt) indicate that carvacrol significantly down-regulate 7 functions, including Energy metabolism, Cell growth and death, and up-regulate 2 functions, including Carbohydrate metabolism and Membrane transport. The network analysis indicates that the correlation between gut bacteria also has been changed. In addition, the insecticidal activity results of carvacrol against L. dispar larvae with gut bacteria elimination showed that gut bacteria can reduce the insecticidal activity of carvacrol against L. dispar larvae.