A series of functional organic–metal AgCl-decorated graphitic carbon nitride (AgCl-CNx) composites were synthesized and applied for the degradation of oxalic acid (OA) under visible light. The highest photocatalytic activity was achieved with AgCl decoration ratio of 1.0 (denoted as AgCl-CN1.0). The pseudo-first-order constant for OA degradation was 0.0722 min−1 with the mineralization efficiency of 90.80% after 60 min reaction in the photocatalytic process with AgCl-CN1.0. A variety of characterization techniques including Brunauer–Emmett–Teller, X-ray diffraction, scanning electron microscope, transmission electron microscopy, X-ray photoelectron spectroscopy, Fourier transform infrared spectra, ultraviolet–visible diffuse reflectance spectra, photoluminescence, and Mott–Schottky were utilized to elucidate the physicochemical, microstructure, and optical properties contributing to the improvement of the photocatalytic performance. The results showed that AgCl-CN1.0 had an oblate flaky erythrocyte-like structure with a moderate band gap energy of ~ 3.00 eV. In addition, the effects of the key parameters (i.e., AgCl-CN1.0 dosage, initial OA concentration, solution pH, and presence of natural organic matter) on OA degradation were systematically investigated. Radical scavenger experiments indicated that photogenerated holes, electrons, superoxide anion radicals, and hydroxyl radicals were the dominant reactive species. Moreover, AgCl-CN1.0 exhibited excellent stability and reusability for OA degradation without detectable Ag+ release in the solution over multiple reaction cycles. The efficient OA mineralization could be mainly ascribed to the moderate specific surface area, increased numbers of active sites, and effective interfacial charge transfer of AgCl-CN1.0. Overall, the AgCl-CN1.0 composite was demonstrated to be a highly efficient, stable, and recoverable photocatalyst.