Both Bactrocera minax and Bactrocera dorsalis are phytophagous insects, and their larvae are latent feeders, which cause great damage and economic losses to agriculture production and trade. This study aimed to provide a scientific reference for researching and developing the feasible countermeasures against these two pests. Based on the distribution data of B. minax and B. dorsalis in China, obtained from the Chinese herbaria, investigation and literature. Four niche models (Garp, Bioclim, Domain, and Maxent) were used to analyze the key environmental factors affecting the distribution of both pests and to build prediction models of the potential distribution in Sichuan Basin. Combined with two statistical standards, area under the receiver operating characteristic curve (AUC) and Kappa, the validity of prediction models were analyzed and compared. The results show that: the average AUC values of the four models are all above 0.90, and the average Kappa values are all above 0.75, indicating that the four models are suitable for predicting the potential distribution area of B. minax and B. dorsalis. The annual range of temperature, the mean temperature in the driest quarter, the mean temperature in the warmest quarter, the annual precipitation, and the precipitation in driest month are the key environmental factors affecting the distribution of B. minax, while the mean diurnal temperature range, the mean temperature in the driest quarter, the seasonal temperature variations and the precipitation in driest month affect the potential distribution of B. dorsalis. The suitable areas for B. minax are mainly concentrated in the eastern of Sichuan Basin, while the suitable areas for B. dorsalis are concentrated in the southeastern. Except for the Bioclim model, the highly-suitable area for both pests predicted by the other three models are all greater than 15.94 × 104 km2 and the moderately-suitable areas are greater than 13.57 × 104 km2. In conclusion, the suitable areas for both pests in Sichuan Basin are quite wide. Therefore, the relevant authorities should be given strengthened monitoring of both pests, especially in areas with high incursion rates.