The invention discloses a photoelectrochemical adaptor sensor as well as a preparation method and application thereof. The photoelectrochemical adaptor sensor comprises a conductive glass electrode, wherein the reacting end surface of the conductive glass electrode is modified with a composite membrane consisting of phosphorus hybridization graphite phase carbon nitride nanosheets loading gold nanoparticles; and a specific adaptor probe is self-assembled on the surface of the membrane. The preparation method of the photoelectrochemical adaptor sensor comprises the following step: modifying thephosphorus hybridization graphite phase carbon nitride nanosheets loading the gold nanoparticles and the specific adaptor probe on the reacting end surface of the conductive glass electrode. The sensor disclosed by the invention has the advantages of high stability, long service life, high anti-jamming capability, wide detection range, low detection limit and the like. The preparation method of the photoelectrochemical adaptor sensor has the advantages of simple technology, convenient operation, safety, low cost, no pollution, high production efficiency and the like. The sensor disclosed by the invention can be widely applied to detecting pollutants (such as antibiotics) in mediums such as a water body and a living body and has the advantages of high utilization rate, wide application range, high application value and the like.