With the extensive use of antibiotics around the world, their contamination problem has now attracted increasing attention, and seeking effective antibiotic contamination management technologies has been imminent. Visible light photocatalytic technology, as an emerging green technology with low cost, high efficiency and good application prospect, has become a research focus both at home and abroad. In this paper, graphitic phase carbon nitride (g-C 3 N 4 ) was used as a photocatalytic material, and the composite photocatalysts g-C 3 N 4 /MoS 2 , g-C 3 N 4 /CuS, g-C 3 N 4 /CdS were produced by compounding it with a series of metal sulfides, and the physical and chemical properties of the composite photocatalysts were characterized by means of SEM, TEM, BET, XRD, XPS, FT-IR, and UV-VIS-NIR. The results show that the prepared composite photocatalytic materials do not change the morphological structure of g-C 3 N 4 , and the introduction of metal sulfides can effectively enhance the light absorption performance and photocatalytic activity of the composites. The best removal of typical antibiotic sulfadimethylpyrimidine (SMT) in water was achieved by g-C 3 N 4 /CdS, with the most stable photocatalytic performance, and the complete removal of SMT could be achieved after 6 h of photocatalysis under LED illumination conditions at wavelengths of 420 nm and 365 nm. g-C 3 N 4 /CdS had the highest photocatalytic activity at pH = 3. Optimal g-C 3 N 4 /CdS was used to prepare flexible polyacrylonitrile carrying carbon nitride nanofiber photocatalysts (PAN/g-C 3 N 4 /CdS) by electrostatic spinning method, which had excellent light absorption properties in UV and visible light regions. SMT removal of PAN/g-C 3 N 4 /CdS reached 100.00% after the light was turned on for 6 h at a wavelength of 365 nm, indicating that the nanofiber photocatalytic materials prepared in this study have excellent photocatalytic activity and antibiotic degradation performance. This paper has important theoretical and practical significance for solving the problem of antibiotic pollution in water bodies.