Our goal was to identify the bacteria inhabiting the reproductive system of the female oriental fruit fly, Bactrocera dorsalis (Hendel), and evaluate the chemotaxis of B. dorsalis to the metabolites produced by the bacteria. Based on 16S rRNA-based polymerase chain reaction-denaturing gradient gel electrophoresis (PCR-DGGE), 18 operational taxonomic units (OTUs) were assigned to the five bacterial classes Betaproteobacteria, Alphaproteobacteria, Gammaproteobacteria, Bacilli and Actinobacteria. Nine OTUs were assigned to Gammaproteobacteria, which was the most highly represented class. Enterobacteriaceae constituted the dominant family, and within this family, three genera and five species were identified, including Enterobacter sakazakii, Klebsiella oxytoca, Klebsiella pneumoniae, Raoultella terrigena and Enterobacter amnigenus. In this set, the first two species were the dominant components, and the latter three species were the minor ones. Finally, we found that the metabolites produced by R. terrigena, K. oxytoca and K. pneumoniae were attractive to the B. dorsalis adults, and in field studies, B. dorsalis adults were most attracted to K. oxytoca. Collectively, our results suggest that the female reproductive system plays an important role in the transfer of enterobacteria from the gut to fruit. Our data may prompt the development of a female-targeted population control strategy for this fly.