Environmental degradation has the potential to alter key mutualisms that underline the structure and function of ecological communities. While it is well recognized that the global loss of coral reefs alters fish communities, the effects of habitat degradation on microbial communities associated with fishes remain largely unknown despite their fundamental roles in host nutrition and immunity. Using a gradient of reef degradation, we show that the gut microbiome of a facultative, coral-feeding butterflyfish (Chaetodon capistratus) is significantly more variable among individuals at degraded reefs with very low live coral cover (~0%) than reefs with higher coral cover (~30%), mirroring a known pattern of microbial imbalance observed in immunodeficient humans and other stressed or diseased animals. We demonstrate that fish gut microbiomes on severely degraded reefs have a lower abundance of Endozoicomonas and a higher diversity of anaerobic fermentative bacteria, which suggests a broader and less coral dominated diet. The observed shifts in fish gut bacterial communities across the habitat gradient extend to a small set of potentially beneficial host associated bacteria (i.e., the core microbiome) suggesting essential fish-microbiome interactions are vulnerable to severe coral degradation.