The photocatalytic self-Fenton technology has demonstrated unique advantages in the low-cost and efficient removal of environmental pollutants. Designing an efficient photocatalytic self-Fenton system (PSFs) to enhance the synergistic effect between photocatalytic H2O2 production and pollutant mineralization processes, as well as understanding the regulatory mechanism of free radical reactions in this process, are crucial for advancing this technology. In this study, an efficient PSFs was developed by coating COFs (TpPa-1) onto the surface of MXene (Ti3C2). Under visible light irradiation, the generation rate of H2O2 reached 983.9 μmol·g−1·h−1, which is 9 times that of pure TpPa-1. Additionally, this led to a significant increase in the removal rate of sulfamethoxazole (SMX) from 25 % to 92 % within 100 min. Photoelectrochemical tests and density functional theory (DFT) calculations confirmed that the incorporation of Ti3C2 not only facilitates efficient charge carrier transport but also enhances the generation of hydroxyl radicals (·OH) and the production of H2O2, thereby improving the photocatalytic self-Fenton removal efficiency of SMX. This research is expected to have a positive impact on the development of efficient PSFs.