[Aim] Spalangia endius and Pachycrepoideus vindemmiae were tested as possible parasitoids to control Zeugodacus cucurbitae pupae. [Method] Non-choice tests were used to determine the parasitic efficiency and fecundity of S. endius and P. vindemmiae, and the effects of soil depth on the parasitic efficiency of the two parasitoids were studied. [Results] The parasitism rates were not significantly different between the two parasitoids. However, the average number of offspring per female of P. vindemmiae was more than that of S. endius. The number of offspring per female of P. vindemmiae and S. endius were 30 and 23, respectively. Soil depth significantly affected the parasitic efficiency of the two parasitoids. The parasitism rates of the two parasitoids decreased with an increasing soil depth, but the parasitism rates of P. vindemmiae fell much faster. S. endius can parasitize the pupae covered with soil at the depth of 8 cm at most. P. vindemmiae failed to parasitize the pupae when the soil was at the depth of 3 cm. [Conclusion] S. endius is more suitable parasitoid for biocontrol of Z. cucurbitae pupae than P. vindemmiae .