Numerous studies have revealed a signature of strong adaptive evolution in the piwi-interacting RNA (piRNA) machinery of Drosophila melanogaster, but the cause of this pattern is not understood. Several hypotheses have been proposed. One hypothesis is that transposable element (TE) families and the piRNA machinery are co-evolving under an evolutionary arms race, perhaps due to antagonism by TEs against the piRNA machinery. A related, though not co-evolutionary, hypothesis is that recurrent TE invasion drives the piRNA machinery to adapt to novel TE strategies. A third hypothesis is that ongoing fluctuation in TE abundance leads to adaptation in the piRNA machinery that must constantly adjust between sensitivity for detecting new elements and specificity to avoid the cost of off-target gene silencing. Rapid evolution of the piRNA machinery may also be driven independently of TEs, and instead from other functions such as the role of piRNAs in suppressing sex-chromosome meiotic drive. We sought to evaluate the impact of TE abundance on adaptive evolution of the piRNA machinery in D. melanogaster and 2 species with higher repeat content-Drosophila ananassae and Drosophila willistoni. This comparison was achieved by employing a likelihood-based hypothesis testing framework based on the McDonald-Kreitman test. We show that we can reject a faster rate of adaptive evolution in the piRNA machinery of these 2 species. We propose that the high rate of adaptation in D. melanogaster is either driven by a recent influx of TEs that have occurred during range expansion or selection on other functions of the piRNA machinery.