The gut microbiome is a crucial element that facilitates a host’s adaptation to a changing environment. Compared to the western honeybee Apis mellifera, the Asian honeybee, Apis cerana populations across its natural range remain mostly semi-feral and are less affected by bee management, which provides a good system to investigate how gut microbiota evolve under environmental heterogeneity on large geographic scales. We compared and analyzed the gut microbiomes of 99 Asian honeybees, from genetically diverged populations covering 13 provinces across China. Bacterial composition varied significantly across populations at phylotype, sequence-discrete population (SDP), and strain levels, but with extensive overlaps, indicating that the diversity of microbial community among A. cerana populations is driven by nestedness. Pollen diets were significantly correlated with both the composition and function of the gut microbiome. Core bacteria, Gilliamella and Lactobacillus Firm-5, showed antagonistic turnovers and contributed to the enrichment in carbohydrate transport and metabolism. By feeding and inoculation bioassays, we confirmed that the variations in pollen polysaccharide composition contributed to the trade-off of these core bacteria. Progressive change, i.e., nestedness, is the foundation of gut microbiome evolution among the Asian honeybee. Such a transition during the co-diversification of gut microbiomes is affected by environmental factors, diets in general, and pollen polysaccharides in particular.