Abstract An ionic liquid based microwave-assisted simultaneous extraction and distillation (ILMSED) method has been developed for the effective extraction of carnosic acid (CA), rosmarinic acid (RA) and essential oil (EO) from Rosmarinus officinalis. A series of 1-alkyl-3-methylimidazolium ionic liquids differing in composition of anion and cation were evaluated for extraction yield in this work. The results obtained indicated that the anions and cations of ionic liquids had influences on the extraction of CA and RA, 1.0 M 1-octyl-3-methylimidazolium bromide ([C8mim]Br) solution was selected as solvent. In addition, the ILMSED procedures for the three target ingredients were optimized and compared with other conventional extraction techniques. ILMSED gave the best result due to the highest extraction yield within the shortest extraction time for CA and RA. The novel process developed offered advantages in term of yield and selectivity of EO and shorter isolation time (20 min in comparison of 4 h of hydrodistillation), and provides a more valuable EO (with high amount of oxygenated compounds). The microstructures and chemical structures of rosemary samples before and after extraction were also investigated. Moreover, the proposed method was validated by the stability, repeatability and recovery experiments. The results indicated that the developed ILMSED method provided a good alternative for the both extraction of non-volatile compounds (CA and RA) and EO from rosemary as well as other herbs.