The microbiota associated with phytophagous insects perform several functions that help insects exploit plant resources. Thus, microorganisms contribute to the dispersal of phytophagous species to new host plants, thereby promoting diversification. In this study, metatranscriptomic analysis was used to compare the gene expression of the microbiome of Anastrepha obliqua Macquart larvae feeding on 3 of its host plants: Spondias purpurea L (red mombin), Mangifera indica L (mango), and Averrhoa carambola L (starfruit). To identify differential gene expression in relation to the host plant, transcript abundance was compared. The results of the taxonomic and functional beta-diversity analysis showed that there were significant differences in the structures and activities of the microbial communities depending on the infested plant. Among the microorganisms, bacteria and fungi were active components of the microbiota. Differential expression analyses showed that the different active genes in each of the plants analyzed were mainly grouped into categories related to carbohydrate and amino acid metabolism, with some of these genes coding for cytochrome o ubiquinol oxidase, cytochrome c, and the enzyme isocitrate dehydrogenase. The microbiota of A. carambola larvae differed more at the level of community structure and gene function, possibly due to the different nutritional composition of the A. carambola and the presence of a set of secondary metabolites specific to the family Oxalidaceae. In conclusion, the transcriptional activity of the microbiota of A. obliqua larvae is influenced by diet, which is important because it could influence the performance of the insect on each of its different host plants.