An innovative photoelectrochemical (PEC) biosensor platform was designed based on the in situ generation of CdS quantum dots (QDs) on graphene oxide (GO) using an enzymatic reaction. Horseradish peroxidase catalyzed the reduction of sodium thiosulfate with hydrogen peroxide to generate H2S, which reacted with Cd(2+) to form CdS QDs. CdS QDs could be photoexcited to generate an elevated photocurrent as a readout signal. This strategy offered a "green" alternative to inconvenient presynthesis procedures for the fabrication of semiconducting nanoparticles. The nanomaterials and assembly procedures were characterized by microscopy and spectroscopy techniques. Combined with immune recognition and on the basis of the PEC activity of CdS QDs on GO, the strategy was successfully applied to a PEC assay to detect carcinoembryonic antigen and displayed a wide linear range from 2.5 ng mL(-1) to 50 μg mL(-1) and a detection limit of 0.72 ng mL(-1) at a signal-to-noise ratio of 3. The PEC biosensor showed satisfactory performance for clinical sample detection and was convenient for determining high concentrations of solute without dilution. This effort offers a new opportunity for the development of numerous rapid and convenient analytical techniques using the PEC method that may be applied in the design and preparation of various solar-energy-driven applications.