The invention relates to the technical field of biosensors, in particular to a biosensor for detecting salmonella based on an aptamer. Based on the specific recognition of the aptamer and a target, ahairpin probe HAP is opened, S1 is replaced from a composite probe S by using a fulcrum-mediated strand displacement reaction, a sequence for forming a G-quadruplex is exposed from the replaced S in acatalytic hairpin self-assembly (CHA) amplification manner, and the G-quadruplex / heme DNA enzyme is formed in the presence of heme. Cysteine is oxidized into cystine by using the catalytic performance of G-quadruplex / heme horseradish peroxidase, charge transfer between cysteine and silver clusters via a gold-sulfur bond cannot be realized, fluorescence signal conduction is regulated and controlled, the aptamer biosensor is constructed, and the biosensor only needs one step in reaction, so that the biosensor has the advantages of high detection speed, simplicity and convenience in operation, low price, low detection limit, high specificity and the like.