A surface-enhanced Raman scattering (SERS) based microRNA (miRNA) probe was designed using molecular beacon (MB). In such a probe, silver nanoparticles were employed as the SERS substrate while 6-FAM was selected as a Raman reporter, which were connected by a hairpin shaped DNA. In the presence of target miRNA, the hairpin opened, making 6-FAM far away from the substrate with a decreased SERS intensity. As the concentration of the targets increased, the SERS intensity of Raman reporters decreased. Thus, according to the intensity-concentration calibration curve, the detection of miRNA-21 could be realized. The convenient, stable and sensitive detection method holds potential in the application of diagnosis.