Beneficial microbial associations with insects are common and are classified as either one or a few intracellular species that are vertically transmitted and reside intracellularly within specialized organs or as microbial assemblages in the gut. Cockroaches and termites maintain at least one if not both beneficial associations. Blattabacterium is a flavobacterial endosymbiont of nearly all cockroaches and the termite Mastotermes darwiniensis and can use nitrogenous wastes in essential amino acid and vitamin biosynthesis. Key changes during the evolutionary divergence of termites from cockroaches are loss of Blattabacterium, diet shift to wood, acquisition of a specialized hindgut microbiota, and establishment of advanced social behavior. Termite gut microbes collaborate to fix nitrogen, degrade lignocellulose, and produce nutrients, and the absence of Blattabacterium in nearly all termites suggests that its nutrient-provisioning role has been replaced by gut microbes. M. darwiniensis is a basal, extant termite that solely retains Blattabacterium, which would show evidence of relaxed selection if it is being supplanted by the gut microbiome. This termite-associated Blattabacterium genome is ϳ8% smaller than cockroach-associated Blattabacterium genomes and lacks genes underlying vitamin and essential amino acid biosynthesis. Furthermore, the M. darwiniensis gut microbiome membership is more consistent between individuals and includes specialized termite gut-associated bacteria, unlike the more variable membership of cockroach gut microbiomes. The M. darwiniensis Blattabacterium genome may reflect relaxed selection for some of its encoded functions, and the loss of this endosymbiont in all remaining termite genera may result from its replacement by a functionally complementary gut microbiota.