Staphylococcus aureus is a gram-staining positive cocci bacillus baterium and also one of the foodborne pathogens, which is a serious potential hazard to human health and food safety. We constructed an electrochemical biosensor for the detection of S. aureus based on nucleic acid aptamers to achieve highly specific detection of S. aureus. The detection of S. aureus was realized by using Aptamer (Apt) to capture S. aureus, which resulted in a change in the spatial conformation of Apt and a decrease in the electrochemical signal. Under the optimized experimental conditions, the detected electrochemical signals were positively correlated with the concentration of S. aureus with a linear range of 1 × 10 1 -1 × 10 5 CFU/mL, a detection limit of 4.76 CFU/mL, and an experimental recovery of 97.43% -99.37%. Therefore, we successfully constructed an electrochemical biosensor for the specific detection of S. aureus, which has the advantages of high specificity, sensitive detection and convenient operation.