For most animals, the microbiome is key for nutrition and pathogen defence, and is often shaped by diet. Corbiculate bees, including honey bees, bumble bees, and stingless bees, share a core microbiome that has been shaped, at least in part, by the challenges associated with pollen digestion. However, three species of stingless bees deviate from the general rule of bees obtaining their protein exclusively from pollen (obligate pollinivores) and instead consume carrion as their sole protein source (obligate necrophages) or consume both pollen and carrion (facultative necrophages). These three life histories can provide missing insights into microbiome evolution associated with extreme dietary transitions. Here, we investigate, via shotgun metagenomics, the functionality of the microbiome across three bee diet types: obligate pollinivory, obligate necrophagy, and facultative necrophagy. We find distinct differences in microbiome composition and gene functional profiles between the diet types. Obligate necrophages and pollinivores have more specialized microbes, whereas facultative necrophages have a diversity of environmental microbes associated with several dietary niches. Our study suggests that necrophagous bee microbiomes may have evolved to overcome cellular stress and microbial competition associated with carrion. We hypothesize that the microbiome evolved social phenotypes, such as biofilms, that protect the bees from opportunistic pathogens present on carcasses, allowing them to overcome novel nutritional challenges. Whether specific microbes enabled diet shifts or diet shifts occurred first and microbial evolution followed requires further research to disentangle. Nonetheless, we find that necrophagous microbiomes, vertebrate and invertebrate alike, have functional commonalities regardless of their taxonomy.