Gut microbiota have important roles in the survival and adaptation of the host. Ophiuroids, as the worldwide dominant benthos, have ecological roles in benthic–pelagic coupling in the sea floor. However, little is known about the composition and diversity of their gut microbiota and its potential functions in benthic ecosystems. In present study, we preformed 16S rRNA sequencing and function analysis in four dominant species (Stegophiura sladeni, Ophiopholis mirabilis, Ophiura sarsii vadicola, and Ophiura kinbergi) with two feeding types (suspension feeding/herbivores and scavenger/carnivores) from the Yellow Sea, China. Results showed that 56 phyla and 569 genera of microbiota were identified among ophiuroid guts. Multivariate and diversity analyses showed that the ophiuroid gut microbiota were independent and have higher biodiversity to the sediment microbial in the Yellow Sea. Phyla Proteobacteria, Firmicutes, Tenericutes, and Bacteroidetes were the dominant bacteria, with more than 80% abundance among the four ophiuroid species. A comparison among the gut microbial compositions among four ophiuroids showed the similarity of two offshore carnivore ophiuroids (S. sladeni and O. sarsii vadicola) and variation in the dominant microbiota types of three nearshore ophiuroids (S. sladeni, O. mirabilis, and O. kinbergi). The functional analysis revealed the significant differences of the environment-related expression in S. sladeni gut microbiota between nearshore and offshore environments. The Phylogenetic Investigation of Communities by Reconstruction of Unobserved States (PICRUSt) functional annotation showed the significant divergence of metabolism pathways between two nearshore species, the herbivores O. mirabilis and carnivores S. sladeni, such as the Lipid metabolism, Carbohydrate metabolism, and Metabolism of cofactors and vitamins. The homolog search and phylogenetic analysis identified the first gut symbiotic Candidatus Hepatoplasma in S. sladeni with important roles for the nutrient metabolisms. Overall, our study reported the comprehensive data of ophiuroid gut microbiota, while the functional microbiome provides insight into the physiology and environmental adaptation in ophiuroids.