Recent studies have predominantly spotlighted bacterial diversity within coral microbiomes, leaving coral-associated fungi in the shadows of scientific inquiry. This study endeavors to fill this knowledge gap by delving into the biodiversity, distribution and functional differences of fungi associated with soft corals Cladiella krempfi and Sarcophyton tortuosum, gorgonian coral Dichotella gemmacea and stony coral Favia speciosa from the South China Sea. Leveraging high-throughput sequencing of fungal internal transcribed spacer-1 (ITS1) region of the rRNA gene, a total of 431 fungal amplicon sequence variants (ASVs) were identified in this study, which indicated that a large number of fungal communities were harbored in the South China Sea corals. Noteworthy among our findings is that 10 fungal genera are reported for the first time in corals, with Candolleomyces, Exophiala, Fomitopsis, Inaequalispora, Kneiffiella, Paraphaeosphaeria, and Yamadazyma belonging to the Ascomycota, and Cystobasidium, Psathyrella, and Solicoccozyma to the Basidiomycota. Moreover, significant differences (p < 0.05) of fungal communities were observed among the various coral species. In particular, the gorgonian coral D. gemmacea emerged as a veritable haven for fungal diversity, boasting 307 unique ASVs. Contrastingly, soft corals S. tortuosum and C. krempfi exhibited modest fungal diversity, with 36 and 21 unique ASVs, respectively, while the stony coral F. speciosa hosted a comparatively sparse fungal community, with merely 10 unique ASVs in total. These findings not only provide basic data on fungal diversity and function in the South China Sea corals, but also underscore the imperative of nuanced conservation and management strategies for coral reef ecosystems worldwide.