Coral-associated microbiomes vary greatly between coral colonies and sampling locations with functional consequences on the coral host. However, the full extent of variability across the ranges of most coral species remains unknown, especially in octocorals and species from mesophotic and deep-sea habitats. Here we characterized the microbiomes of four octocoral species from mesophotic and deep-sea habitats in the northern Gulf of Mexico,Muricea pendula,Swiftia exserta,Callogorgia delta, andParamuricea biscayausing 16S metabarcoding. We tested for microbiome differentiation between and within species, examining the influence of the coral′s genotype and environmental factors that vary with depth (53-2224 m) and geographic location (over 680 m). Coral microbiomes were often dominated by a single amplicon sequence variant – ASV (>50% relative abundance) whose abundance varied across the range of the host coral. These included corallicolid apicomplexans,Endozoicomonas, members of the Mollicutes, and the BD1-7 clade of Spongiibacteraceae. Coral species, depth, and geographic location significantly affected microbial community composition, richness, and evenness, as well as the abundance of individual microbes. Differences in bottom temperature and surface primary productivity could explain part of the variation associated with depth and geographic location, respectively. However the coral genotype was confounded with depth so its effect could not be dissected. Altogether, this work demonstrates that the microbiomes of corals vary substantially across their ranges in ways that may have functional consequences, identifies important ecological drivers in mesophotic and deep-sea corals, and can inform restoration efforts.