In the present study, a rapid and effective method based on alendronate sodium grafted mesoporous magnetic nanoparticle (Fe3O4@ANDS) extraction for the determination of trans-resveratrol (TRA) in peanut oils was developed by coupling with HPLC-UV detection. The Fe3O4@ANDS was prepared via Lewis acid/base interaction which was simply carried out in mild aqueous condition without the using of organic solvent. The resultant Fe3O4@ANDS encompassed amino group on its surface, and it was employed as magnetic solid-phase extraction adsorbent for purification and enrichment of TRA from peanut oils through hydrogen bond interaction. Under the optimized conditions, the whole pretreatment process could be accomplished within 10 min without time-consuming concentrated and reconstituted process. The linearity range of the proposed method was 1–10,000 ng/g with satisfactory correlation coefficient (R2) of 0.9992. The recoveries in spiked oil samples were in the range of 78.6–118.9% with the RSDs less than 3.3% (intra-day) and 15.2% (inter-day). The limit of detection for TRA in peanut oils was 0.3 ng/g which was comparative to the reported methods by using LC-MS/MS detection. Finally, the established method was successfully applied to the analysis of TRA in several peanut oils with different brands from local market as well as other kinds of vegetable oils.