The next generation sequencing (NGS) approach has facilitated the investigations of gut microbiota with high throughput and resolution. The present study was focused on the taxonomic and functional characterization of bacterial community associated with different developmental stages of melon fly, Zeugodacus cucurbitae using 16S ribosomal RNA (rRNA) gene amplicons metagenomics. Z. cucurbitae is considered an invasive and most staid polyphagous pest of cucurbitaceous and other related crops. The taxonomic analysis of highly variable V3-V4 region of bacterial 16S rRNA gene sequencing indicated that the bacterial community associated with Z. cucurbitae consists of a total of 23 bacterial phyla (including unclassified and unassigned bacteria), comprising 32 classes, 69 orders, 99 families and 130 genera. Proteobacteria, Firmicutes, Actinobacteria and Tenericutes were dominant phyla of which family, Enterobacteriaceae was the most abundant in the larval and adult female stages, whereas Mycoplasmataceae was the dominant in the pupal stage. In larval stages of Z. cucurbitae, genus Providencia and Comamonas were the most abundant. However, genus Candidatus-Bacilloplasma and Klebsiella werethe most dominant in pupae and adult females of Z. cucurbitae, respectively. PICRUSt analysis conducted for prediction of metabolic activities revealed that associated microbiota were involved in membrane transport, carbohydrate metabolism, amino acid metabolism, energy metabolism, replication and repair processes as well as cellular processes and signalling. The higher number of OTUs was annotated for phosphoglycerate mutase and transketolase in adult females followed by larval stages, which may support the digestive function of the microbiota in larvae and adult females. Our findings provide insights about the high variation in microbiota across developmental stages and basis for microbiota-based management strategies of fruit flies.