Currently, many aptamers of different target molecules have been screened by systematic evolution of ligands by exponential enrichment (SELEX) method. However, since the crystal structure of aptamers is complicated to obtain, few studies focus on the quantitative structure activity relationship (QSAR) of aptamers. It is significant to develop a virtual screening method for aptamers based on the QSAR model. In this study, a piezoresistive micro-cantilever aptasensor was fabricated to quantificationally detect ricin based on a new aptamer obtained via a virtual screening method. The advanced screening method based on the established QSAR model can screen aptamers formed by site-directed mutation of bases. The results of intermolecular interactions and molecular docking displayed that the new aptamer was mainly bound to ricin A-chain, and its combination of ricin with ricin B-chain aptamer has a significant synergistic effect. Due to the aptamer with excellent performance and the good linear relationship between the relative resistance change and the vertical deformation of the micro-cantilever, the piezoresistive micro-cantilever aptasensor emerged a linear detection range from 7.5 pg mL-1 to 75 ng mL-1 (R2 = 0.949) with the limit of detection 750 fg mL-1 (S/N ≥ 3) for ricin. Furthermore, the proposed piezoresistive micro-cantilever sensor displayed excellent analytical performance with good reproducibility and high specificity.