The invention discloses a method for detecting miRNA-21 based on electrochemical alternating current impedance. The method comprises the following steps: firstly, burnishing a gold electrode, polishing and drying; secondly, soaking the surface of the gold electrode in miRNA-21 aptamer solution, and then sequentially performing electron beam irradiation, glucose aqueous solution soaking as well asflushing and drying; placing the gold electrode in a magnetic field to be soaked, flushing and drying; dropwise adding mercaptoethanol solution and performing reaction, flushing and drying, so that anactivated gold electrode is obtained; thirdly, preparing multiple activated gold electrodes, dropwise adding miRNA-21 solution with different concentrations, performing reaction, and then flushing and drying, so that multiple detection gold electrodes are obtained; fourthly, detecting an impedance value corresponding to the miRNA-21 solution with each concentration; fifthly, calculating to obtaina linear relationship between the concentrations and difference values of the impedance values; and sixthly, detecting an impedance value of to-be-detected sample solution, and calculating and obtaining the concentration of the miRNA-21 in the to-be-detected sample solution by adopting the linear relationship. The method disclosed by the invention has the beneficial effect of high detection sensitivity.