Host–parasites interaction is a common phenomenon in nature. Diffusive coevolution might maintain stable cooperation in a fig–fig wasps system, in which the exploiter might diversify their genotype, phenotype, or behavior as a result of competition with pollinator, whereas the figs change flower syconia, fruits thickness, and syconia structure. In functionally dioecious Ficus auriculata, male figs and female figs contain two types of florets on separate plant, and share high similarities in outside morphology. Apocryptophagus (Sycophaginae, Chalcidoidea, Hymenoptera) is one of few groups of nonpollinating fig wasps that can reproduce within both male and female figs. On the basis of the morphology and DNA barcoding, evidence from partial sequences of mitochondrial cytochrome c oxidase I and nuclear internal transcribed spacer 2, we found that there are two nonsibling Apocryptophagus species living on male and female F. auriculata figs, respectively. We estimated that these two species diverged about 19.2 million years ago. Our study suggests that the host shift from Ficus variegate or Ficus prostrata fig species to male figs is a preference way for Apocryptophagus wasps to adapt to the separation of sexual function in diecious figs. Furthermore, to escape the disadvantage or sanction impact of the host, the exploiter Apocryptophagus wasps can preferably adapt to exploiting each sex of the figs, by changing their oviposition, niche shift, and habitat.