Several species of swallowtail butterflies (genus Papilio) are Batesian mimics that express multiple mimetic female forms, while the males are monomorphic and nonmimetic. The evolution of such sex‐limited mimicry may involve sexual dimorphism arising first and mimicry subsequently. Such a stepwise scenario through a nonmimetic, sexually dimorphic stage has been proposed for two closely related sexually dimorphic species: Papilio phorcas, a nonmimetic species with two female forms, and Papilio dardanus, a female‐limited polymorphic mimetic species. Their close relationship indicates that female‐limited polymorphism could be a shared derived character of the two species. Here, we present a phylogenomic analysis of the dardanus group using 3964 nuclear loci and whole mitochondrial genomes, showing that they are not sister species and thus that the sexually dimorphic state has arisen independently in the two species. Nonhomology of the female polymorphism in both species is supported by population genetic analysis of engrailed, the presumed mimicry switch locus in P. dardanus. McDonald–Kreitman tests performed on SNPs in engrailed showed the signature of balancing selection in a polymorphic population of P. dardanus, but not in monomorphic populations, nor in the nonmimetic P. phorcas. Hence, the wing polymorphism does not balance polymorphisms in engrailed in P. phorcas. Equally, unlike in P. dardanus, none of the SNPs in P. phorcas engrailed were associated with either female morph. We conclude that sexual dimorphism due to female polymorphism evolved independently in both species from monomorphic, nonmimetic states. While sexual selection may drive male–female dimorphism in nonmimetic species, in mimetic Papilios, natural selection for protection from predators in females is an alternative route to sexual dimorphism.