Background: The endosymbiont Wolbachia pipientis infects a broad range of arthropod and filarial nematode hosts. These diverse associations form an attractive model for understanding host: symbiont coevolution. Wolbachia s ubiquity and ability to dramatically alter host reproductive biology also form the foundation of research strategies aimed at controlling insect pests and vector-borne disease. The Wolbachia strains that infect nematodes are phylogenetically distinct, strictly vertically transmitted, and required by their hosts for growth and reproduction. Insects in contrast form more fluid associations with Wolbachia. In these taxa, host populations are most often polymorphic for infection, horizontal transmission occurs between distantly related hosts, and direct fitness effects on hosts are mild. Despite extensive interest in the Wolbachia system for many years, relatively little is known about the molecular mechanisms that mediate its varied interactions with different hosts. We have compared the genomes of the Wolbachia that infect Drosophila melanogaster, wMel and the nematode Brugia malayi, wBm to that of an outgroup Anaplasma marginale to identify genes that have experienced diversifying selection in the Wolbachia lineages. The goal of the study was to identify likely molecular mechanisms of the symbiosis and to understand the nature of the diverse association across different hosts. Results: The prevalence of selection was far greater in wMel than wBm. Genes contributing to DNA metabolism, cofactor biosynthesis, and secretion were positively selected in both lineages. In wMel there was a greater emphasis on DNA repair, cell division, protein stability, and cell envelope synthesis. Conclusion: Secretion pathways and outer surface protein encoding genes are highly affected by selection in keeping with host: parasite theory. If evidence of selection on various cofactor molecules reflects possible provisioning, then both insect as well as nematode Wolbachia may be providing substances to hosts. Selection on cell envelope synthesis, DNA replication and repair machinery, heat shock, and two component switching suggest strategies insect Wolbachia may employ to cope with diverse host and intra-host environments.