CeO2/g-C3N4 heterojunction photocatalyst had been successfully fabricated through a one-step in-situ pyrolysis formation of 3D hollow CeO2 mesoporous nanospheres and 2D g-C3N4 nanosheets together with simultaneous removal of carbon sphere templates after heat treatment. The sample shows high catalytic performances for photocatalytic hydrogen generation and photocatalytic oxidation of Bisphenol A (BPA) under visible light irradiation, and the catalytic degradation route of BPA was suggested by the degradation products determined by GC–MS. The enhancing catalytic activity was attributed to the effective interfacial charge migration and separation. Finally, it was proposed that the CeO2/g-C3N4 heterojunction photocatalyst could follow a more appropriate Z-scheme charge transfer mechanism, which was confirmed by the analysis of experiment and theoretical calculation results.