Anoplophora glabripennis(Coleoptera: Cerambycidae: Lamiinae) is an invasive wood borer pest that has caused considerable damage to forests. Gut bacteria are of great importance in the biology and ecology of herbivores, especially in growth and adaptation; however, change in the gut bacterial community of this pest feeding on different hosts is largely unknown. In this study, we investigated the gut bacterial communities ofA. glabripennislarvae fed on different preferred hosts,Salix matsudanaandUlmus pumila, using 16S rDNA high-throughput sequencing technology. A total of 15 phyla, 25 classes, 65 orders, 114 families, 188 genera, and 170 species were annotated in the gut ofA. glabripennislarvae fed onS. matsudanaorU. pumilausing a 97% similarity cutoff level. The dominant phyla were Firmicutes and Proteobacteria and the core dominant genera wereEnterococcus,Gibbsiella,Citrobacter,Enterobacter, andKlebsiella. There was significantly higher alpha diversity in theU. pumilagroup than in theS. matsudanagroup, and principal co-ordinate analysis showed significant differences in gut bacterial communities between the two groups. The genera with significant abundance differences between the two groups wereGibbsiella,Enterobacter,Leuconostoc,Rhodobacter,TM7a,norank,Rhodobacter, andAurantisolimonas, indicating that the abundance of larval gut bacteria was affected by feeding on different hosts. Further network diagrams showed that the complexity of the network structure and the modularity were higher in theU. pumilagroup than in theS. matsudanagroup, suggesting more diverse gut bacteria in theU. pumilagroup. The dominant role of most gut microbiota was related to fermentation and chemoheterotrophy, and specific OTUs positively correlated with different functions were reported. Our study provides an essential resource for the gut bacteria functional study ofA. glabripennisassociated with host diet.