The state of Piauí is in a Cerrado/Caatinga transition area, which is known the richness of its fauna and flora. Therefore, this work aims to know the diversity of fruit fly species in cashew orchards and native forest fragments in the south-central region of Piauí. Fruit flies were collected in McPhail traps and by sampling fruits. The material collected from the traps and the fruits in the two areas were taken to the Laboratory of Phytotechnics from Campus Prof. Cinobelina Elvas at the Universidade Federal do Piauí (UFPI/CPCE), municipality of Bom Jesus, Piauí, Brazil. In McPhail traps, six species of the genus Anastrepha: A. alveata, A. dissimilis, A. fraterculus, A. manihoti, A. obliqua, and A. zenildae were captured, of which A. fraterculus, A. obliqua, and A. zenildae were present in both areas. Anastrepha alveata, A. dissimilis and A. manihoti occurred only in the cashew orchard. In fruit sampling, A. fraterculus, A. obliqua, and A. zenildae infested wild-guava fruits, Myrcia tomentosa (Myrtaceae), in native forest. Anastrepha fraterculus, A. obliqua and A. zenildae were obtained directly from M. tomentosa fruits and from traps. The availability of host fruits is the factor that most influences the population fluctuation of fruit flies, mainly in the native forest area. Anastrepha manihoti is reported for the first time in the state of Piauí. This is the first record of A. fraterculus, A. obliqua and A. zenildae, infesting wildguava fruits, M. tomentosa.