Quantum-sized cerium dioxide (CeO2) show high catalytic capability as well as strong light absorption ability owing to its redox couple Ce4+/Ce3+ and abundant oxygen vacancies, which making it a potential material for designing superior photoelectrochemical (PEC) sensors. However, it has scarcely been applied in the field of PEC sensing, because its wide band gap and aggregation effect can restrict the photoelectric conversion efficiency. Herein, we address these two obstacles by coupling CeO2 quantum dots (QDs) with graphitic carbon nitride (g-CN) and Au nanoparticles (NPs). The electron transfer path in this proposed heterojunction was proved by density functional theory (DFT) calculation for the first time, which provided theoretical support for the detection of MC-LR. The as-obtained PEC aptasensor exhibited excellent analytical performance with a wide liner response of 0.05–105 pM, and the detection limit was 0.01 pM. By designing appropriate sensing system and specific recognition mechanism, this work may pave a unique avenue for constructing ultrasensitive and selective analysis of MC-LR in complex environment without any external electric source.