Carcinoembryonic antigen (CEA) was used as the model, an ultrasensitive label-free photoelectrochemical immunosensor was developed using 2D TiO2 nanosheets and carboxylated graphitic carbon nitride (g-C3N4) as photoactive materials and ascorbic acid as an efficient electron donor. 2D TiO2 nanosheets was sythsized by surfactant self-assembly method and proved to have higher photoelectrochemical signals than TiO2 nanoparticles. Firstly, carboxylated g-C3N4 could be attached to 2D TiO2 nanosheets through the bond formed between carboxyl group of carboxylated g-C3N4 and TiO2. And the photocurrent of g-C3N4/TiO2 drastically enhances compared to carboxylated g-C3N4 and TiO2. Then, antibody of CEA was bonded to TiO2 through the dentate bond formed between carboxyl group of anti-CEA and TiO2, leading to the decrease of the photocurrents. As proven by PEC experiments and electrochemical impedance spectroscopy (EIS) analysis, the fabrication process of the immunosensor is successful. Under the optimal conditions, the intensity decreased linearly with CEA concentration in the range of 0.01~10 ng/mL. The detection limit is 2.1 pg/mL. The work provides an effective method for the detection of tumor markers and can be extended for the application in food safety and environmental monitoring analysis.