Symbiotic microorganisms in insects regulate multiple physiological functions, widely participating in nutrient metabolism, immune regulation, and crucial regulatory roles in development. However, little is known about how microbial factors might respond to the preparation of insect diapause. The gut bacterial communities of Loxostege sticticalis larvae induced at different photoperiod of long (LD16:8, nondiapause) and short (LD12:12, prediapause) daylength were compared, by 16S rRNA Illumina MiSeq. A total number of 42 phylum, 78 classes, 191 orders, 286 families, 495 genera, and 424 species were identified in the intestinal bacterial community of L. sticticalis larvae. Alpha diversity and beta diversity analyses revealed significant differences between nondiapause and prediapause larvae. In non-diapause larvae, the dominant intestinal bacteria were Firmicutes and Proteobacteria. In specific, in 3rd and 4th instar larvae, the main intestinal bacteria were Staphylococcus, while in 5th instar, it was JC017. For the prediapause larvae, the dominant phylum in 3rd instar larvae was Firmicutes, with the dominant genus of Staphylococcus, while in 4th and 5th instar larvae was Bacteroidota, with the dominant genus 4th instar was Staphylococcus, and in 5th instar was JC017. KEGG functional prediction analysis revealed that functional bacterial groups involved in metabolism had the highest abundance values. Specifically, the amino acid metabolism of metabolism-related functional genes in the 3rd instar prediapause larvae was significantly lower than that in the 4th and 5th instar prediapause larvae and the non-diapause treatment. However, the carbohydrate metabolism in 3rd instar prediapause larvae was significantly higher than that in 4th and 5th instar prediapause larvae and non-diapause treatments. The dominant bacterial phylum in the prediapause larvae at different stages of L. sticticalis was varied, and there were significant differences in community diversity and richness. These results suggest a complex interaction between the hosts' physiological state and its gut microbiota, indicating that bacterial communities may assist insects in adapting to diapause preparation by regulating their metabolic levels. This study lays the foundation for further understanding the physiological mechanisms by which intestinal microorganisms regulate overwintering dormancy in the L. sticticalis.