Ionic liquid-based online ultrasonic assisted extraction (UAE) and solid-phase trapping (SPT) technique was developed to extract selectively rhodiosin and rhodionin from Rhodiola rosea for rapid determination by ultra-performance liquid chromatography. Ionic liquids with different cations and anions were investigated and 1-ethyl-3-methylimidazolium bromide solution was selected as the optimal extractant at concentration of 2.0 mol/L. Some extraction parameters such as ultrasonic power, extraction time, and extractant flow rate were optimized. The optimum separation conditions were as follows: ultrasonic power 360 W, extraction time 25 min, extractant flow rate 0.8 mL/min. The proposed approach was evaluated in comparison with the conventional maceration extraction and regular ultrasonic assisted extraction. UAE and SPT offered short extraction time, remarkable efficiency and low column pressure. Moreover, the proposed method was validated by the recovery and precision. Mean recoveries for rhodiosin and rhodionin were 98.5 and 98 %, respectively. The intra- and inter-day precision (RSD) was 1.59 and 2.98 % for rhodiosin and 1.78 and 2.05 % for rhodionin. UAE and SPT provided a new alternative for preparation of flavonoids compounds from solid sample.