Photocatalysis is an advanced oxidation process that shows excellent promise in degrading organic pollutants present in water. However, electrons and holes tend to combine easily during the transfer process, and the adsorption capacity of single-phase photocatalytic materials is weak, resulting in a low degradation rate. Therefore, a new composite semiconductor photocatalyst g-C3N4/NH2-MIL-125 was constructed using a two-step solvothermal method. The morphology, elemental composition, structure, photoelectric properties, and photocatalytic activity of g-C3N4/NH2-MIL-125 were characterized. The photocatalytic degradation of Sulfamethoxazole (SMX) in water was also carried out. Results indicated that g-C3N4/NH2-MIL-125 had been synthesized successfully, and g-C3N4/NH2-MIL-125 had a broader photoresponse range, higher adsorption capacity, and higher separation efficiency of photogenerated carriers. When pH was 4.0 and catalyst dosage was 0.15 g/L, g-C3N4/NH2-MIL-125 showed the highest degradation rate for SMX. It was confirmed that the main active groups in SMX degradation were OH, h+, and O2−. 15 kinds of intermediates of SMX and the possible degradation pathways were identified by high-performance liquid chromatography-mass spectrometry and DFT calculation. Toxicity analysis revealed that the intermediate products have a lower developmental toxicity than SMX. This work demonstrated that g-C3N4/NH2-MIL-125 has great potential in eliminating antibiotics from water.