A novel in situ-generated nanogold plasmon-enhanced photoelectrochemical aptasensor for Hg(2+) ions was fabricated using a perylene-3,4,9,10-tetracarboxylic acid/graphene (PTCA-GR) heterojunction. The fabricated photoelectrochemical aptasensor was based on thymine-Hg(2+)-thymine coordination chemistry and the plasmonic near-field absorption enhancement effect of the subsequent specific catalytic formation of nanogold. The energetic electrons from the surface plasmons of the nanogold were injected into the LUMO orbit of the organic PTCA semiconductor and then rapidly transferred to the electrode through GR due to the possible Hg(2+)-DNA molecular wires following irradiation with the visible light (λ > 450 nm) and at a bias voltage of 0.2 V. The fabricated aptasensor was linear in its response to the concentration of Hg(2+) ions in the range of 5-500 pmol L(-1), with a detection limit of 2 pmol L(-1). The presence of up to 200-fold greater concentrations of other common metal ions did not interfere with the detection of Hg(2+) ions in an aqueous system, and the results corresponded well with those obtained by ICP-MS. This novel plasmon-enhanced photoelectrochemical aptasensor exhibited good performance with its high sensitivity, good selectivity, low cost, and portable features. The strategy of the localized surface plasmon resonance through the in situ generation of noble metal nanoparticles paves the way for improvements in PEC aptasensor performance.