Timely and rapid detection of antibiotic residues in the environment is conducive to safeguarding human health and promoting an ecological virtuous cycle. A foldable paper-based photoelectrochemical (PEC) sensor was successfully developed for the detection of ampicillin (AMP) based on glutathione/zirconium dioxide hollow nanorods/aptamer (GSH@ZrO2 HS@apt) modified cellulose paper as a reactive zone with laser direct-writing lead sulfide/cadmium sulfide/graphene (PbS/CdS/LIG) as photoelectrode and cobalt hydroxide (CoOOH) as a photoresist material. Initially, AMP was introduced into the paper-based reaction zone as a biogate aptamer, which specifically recognized the target and then left the ZrO2 HS surface, releasing glutathione (GSH) encapsulated inside. Subsequently, the introduction of GSH into the reaction region and etching of CoOOH nanosheets to expose the PbS/CdS/LIG photosensitive material increased photocurrent. Under optimal conditions, the paper-based PEC biosensor showed a linear response to AMP in the range of 5.0 - 2 × 104 pM with a detection limit of 1.36 pM (S/N = 3). In addition, the constructed PEC sensing platform has excellent selectivity, high stability and favorable reproducibility, and can be used to assess AMP residue levels in various real water samples (milk, tap water, river water), indicating its promising application in environmental antibiotic detection.