For the first time, a novel, efficient and environmentally friendly method termed ionic liquid-based ultrasound-assisted surfactant-emulsified microextraction (IL-UA-SE-ME) was developed and compared with normal-, reversed-, surfactant assisted-dispersive liquid–liquid microextraction and ultrasound-assisted surfactant-based emulsification microextraction methods for the analysis of three bioactive and flavoring compounds (para-anisaldehyde, trans-anethole and its isomer estragole) in some fresh plants (fennel and basil), their extracts and urine samples. The results showed that IL-UA-SE-ME is a much more effective method and under the optimum conditions (including extraction solvent: 90μL of [C6MIM][PF6]; disperser: 5mg of N-dodecylbenzenesulfonic acid sodium salt; sample pH: 3; sonication time: 5min; and centrifuging time: 5min), limits of detection, limits of quantification, linear ranges, recoveries, and enrichment factors were in the range of 16–22ngmL−1, 49–67ngmL−1, 0.04–90μgmL−1, 94.3%–101.1%, and 118–127, respectively.