Light is completely absent in cave habitats, causing a shortage or lack of autochthonous photosynthesis. Thus, understanding the mechanisms underlying the ability of organisms to adapt to the unique cave habitat is of great interest. We used high-throughput sequencing of the 16S ribosomal RNA gene of intestinal microorganisms from 11 Sinocyclocheilus (Cypriniformes: Cyprinidae) species, to explore the characteristics of intestinal microorganisms and the adaptive mechanisms of Sinocyclocheilus cavefish and surface fish. We found that the α-diversity and richness of the intestinal microbiome were much higher in cavefish than in surface fish. Principal coordinate analysis showed that cavefish and surface fish formed three clusters because of different dominant gut microorganisms which are generated by different habitats. Based on PICRUSt-predicted functions, harmful substance degradation pathways were much more common in cavefish intestinal microorganisms than in those from surface fish. The intestinal microbiota of surface fish group 1 had a higher capacity for carbohydrate metabolism, whereas protein and amino acid metabolism and digestive pathways were more abundant in microorganisms from the cavefish group and surface fish group 2. Combined analysis of the intestinal microbial composition and functional predictions further revealed the structures and functions of intestinal microbial communities in Sinocyclocheilus cave and surface species. Moreover, based on their habits and intestinal microbial composition and intestinal microbial functional predictions, we inferred that the three fish groups were all omnivorous; however, surface fish group 1 preferred feeding on plants, while surface fish group 2 and cavefish preferred meat. This study improves our understanding of mechanisms of adaptation in cave habitats and may contribute to the protection of these habitats from water pollution.