Fruit flies in the family Tephritidae are the economically important pests that have many species complexes. DNA barcoding has gradually been verified as an effective tool for identifying species in a wide range of taxonomic groups, and there are several publications on rapid and accurate identification of fruit flies based on this technique; however, comprehensive analyses of large and new taxa for the effectiveness of DNA barcoding for fruit flies identification have been rare. In this study, we evaluated the COI barcode sequences for the diagnosis of fruit flies using 1426 sequences for 73 species of Bactrocera distributed worldwide. Tree-based [neighbour-joining (NJ)]; distance-based, such as Best Match (BM), Best Close Match (BCM) and Minimum Distance (MD); and character-based methods were used to evaluate the barcoding success rates obtained with maintaining the species complex in the data set, treating a species complex as a single taxon unit, and removing the species complex. Our results indicate that the average divergence between species was 14.04% (0.00–25.16%), whereas within a species this was 0.81% (0.00–9.71%); the existence of species complexes largely reduced the barcoding success for Tephritidae, for example relatively low success rates (74.4% based on BM and BCM and 84.8% based on MD) were obtained when the sequences from species complexes were included in the analysis, whereas significantly higher success rates were achieved if the species complexes were treated as a single taxon or removed from the data set – BM (98.9%), BCM (98.5%) and MD (97.5%), or BM (98.1%), BCM (97.4%) and MD (98.2%).