The family Tephritidae comprises numerous fruit fly species, some of which are economically significant, such as several in the genus Anastrepha. Most pest species in this genus belong to the fraterculus group, characterized by closely related species that are difficult to differentiate due to recent divergence and gene flow. Identifying genetic markers for their study is paramount for understanding the group’s evolution and eventual phytosanitary control. Because there is variation in eggshell morphology among species in the genus, we studied the rapidly evolving defective chorion 1 (dec-1) gene, which is crucial for chorion formation and reproduction. Fragments of dec-1 from two of the most important pest species in the genus, Anastrepha fraterculus and Anastrepha obliqua, were amplified and compared to transcriptome sequences, as well as dec-1 sequences from Anastrepha ludens, which was used for structure prediction. These data revealed three alternative transcripts in A. fraterculus and A. obliqua, consistent with patterns found in other Tephritidae; we obtained orthologous sequences for these other tephritids from NCBI to investigate patterns of selection affecting this gene at different hierarchical levels using different methods. These analyses show that purifying selection has had an important role across the whole gene and throughout its history, but there was evidence of positive and episodic diversifying selection at different levels. Different parts of the gene have shown distinct evolutionary rates, potentially correlating with the diverse proproteins produced by posttranslational changes. This correlation appears evident in certain lineages, including the branch that separates Anastrepha, as well as other internal branches that differentiate species within the genus. Our data showed that this gene shows remarkable variation across its different exons, which has proven to be informative at different evolutionary levels. These changes hold promise not only for studying differentiation in Anastrepha but also for the eventual management of selected pest species.