Coral reef ecosystems are under a variety of threats from global change and anthropogenic disturbances that are reducing the number and type of coral species on reefs. Coral reefs support upwards of one third of all marine species of fish, so the loss of coral habitat may have substantial consequences to local fish diversity. We posit that the effects of habitat degradation will be most severe in coral regions with highest biodiversity of fishes due to greater specialization by fishes for particular coral habitats. Our novel approach to important but untested hypothesis was to conduct the same field experiment at three geographic locations across the Indo-Pacific biodiversity gradient (Papua New Guinea; Great Barrier Reef, Australia; French Polynesia). Specifically, we experimentally explored whether the response of local fish communities to identical changes in diversity of habitat-providing corals was independent of the size of the regional species pool of fishes. We found that the proportional reduction (sensitivity) in fish biodiversity to loss of coral diversity was greater for regions with larger background species pools, reflecting variation in the degree of habitat specialization of fishes across the Indo-Pacific diversity gradient. This result implies that habitat-associated fish in diversity hotspots are at greater risk of extinction to a given loss of habitat diversity compared to regions with lower species richness. This mechanism, related to the positive relationship between habitat specialization and regional biodiversity, and the elevated extinction risk this poses for biodiversity hotspots, may apply to species in other types of ecosystems.