Wasps play important roles as predators and pollinators in the ecosystem. The Jingpo minority residing in Yunnan Province, China, has a traditional practice of using wine infused with mature wasps as a customary remedy for managing rheumatoid arthritis. The larva of the wasp is also a tasteful folk dish that has created a tremendous market. There is a paucity of survival knowledge, which has greatly restricted their potential applications in food and healthcare. Recent research has highlighted the importance of gut microbiota in insect growth. Nevertheless, there is still a lack of understanding regarding the composition, changes, and functions of the gut microbiota in Vespa mandarinia during development. In this research, the gut microbiota were investigated across three growth stages of Vespa mandarinia using a metagenomic technology. The result revealed that there are significant variations in the proportion of main gut microbes during the metamorphosis of Vespa mandarinia. Tenericutes were found to dominate during the larval stage, while Proteobacteria emerged as the dominant group post-pupation. Through a comprehensive analysis of the gut microbiota metagenome, this study revealed functional differences in the wasp gut microbiota at various growth stages. During the larval stage, the gut microbiota plays a central role in promoting metabolism. Following pupation, the gut microbiota exhibited diversified functions, likely due to the complex environments and diverse food sources encountered after metamorphosis. These functions included amino acid metabolism, compound degradation, and defense mechanisms. This research provides an extensive dataset on the gut microbiota during the metamorphosis of Vespa mandarinia, contributing to a deeper understanding of the influence of gut microbiota on wasp growth. Furthermore, this study uncovers a unique microbial treasure within insect guts, which is important for advancing the application of wasps in the fields of food and medicine.