Male abdomen appendages are a novel trait found within Sepsidae (Diptera). Here we demonstrate that they are likely to have evolved once, were lost three times, and then secondarily gained in one lineage. The developmental basis of these appendages was investigated by counting the number of histoblast cells in each abdominal segment in four species: two that represented the initial instance of appendage evolution, one that has secondarily gained appendages, and one species that did not have appendages. Males of all species with appendages have elevated cell counts for the fourth segment, which gives rise to the appendages. In Perochaeta dikowi, which reacquired the trait, the females also have elevated cell count on the fourth segment despite the fact that females do not develop appendages. The species without appendages has similar cell counts in all segments regardless of sex. These results suggest that the basis for appendage development is shared in males across all species, but the sexual dimorphism is regulated differently in P. dikowi.