The g-C3N4 nanosheet was prepared by calcination method, the MoS2 nanosheet was prepared by hydrothermal method. The g-C3N4/MoS2 composites were prepared by ultrasonic composite in anhydrous ethanol. X-ray diffraction, scanning electron microscopy, transmission electron microscopy, X-ray photoelectron spectroscopy, ultraviolet–visible spectroscopy, and photoluminescence techniques were used to characterize the materials. The photocatalytic degradation of Rhodamine B (Rh B) by g-C3N4/MoS2 composites with different mass ratios was investigated under visible light. The results show that a small amount of MoS2 combined with g-C3N4 can significantly improve photocatalytic activity. The g-C3N4/MoS2 composite with a mass ratio of 1:8 has the highest photocatalytic activity, and the degradation rate of Rh B increases from 50 to 99.6%. The main reason is that MoS2 and g-C3N4 have a matching band structure. The separation rate of photogenerated electron–hole pairs is enhanced. So the g-C3N4/MoS2 composite can improve the photocatalytic activity. Through the active material capture experiment, it is found that the main active material in the photocatalytic reaction process is holes, followed by superoxide radicals.