Element doping strategies are commonly employed to achieve effective photocatalysts. In this work, a novel form of P and Ce co -doped g-C3N4 nanosheets was synthesized using a one-step thermal polymerization technique, exhibiting remarkable efficiency in the degradation of organic pollutants under visible light. The prepared catalysts underwent comprehensive characterization through XRD, FT-IR, SEM, TEM, BET, XPS, UV-vis, PL, and electrochemical testing. The electronic and optical properties of the catalysts were further elucidated using firstprinciples density functional theory (DFT). In the photocatalytic experiment of degrading Rhodamine B (RhB), the photocatalytic ability of g-C3N4 nanosheets was improved at different degrees, among which g-C3N4 nanosheets co -doped with P and Ce showed the highest photocatalytic activity, with a degradation efficiency of 90.58 % for RhB. Furthermore, the photocatalytic mechanism was confirmed through free radical capture experiments. This study presents a novel approach for the development of efficient photocatalysts to remove pollutants.