A simple, environment friendly and efficient technique, ionic liquid-based microwave-assisted extraction was first used to determine malachite green and crystal violet (CV) from water samples coupled to HPLC. The key parameters influencing extraction efficiency were investigated, such as the type of ionic liquids, the volume of ionic liquid, extraction time, and so on. Under the optimum conditions, good reproducibility of the extraction performance was obtained (RSD, 1.0% for malachite green (MG) and 5.9% for CV, n = 5). Good linearity (0.10–25 μg L−1) was observed with correlation coefficients between 0.9991 and 0.9964. The detection limits of MG and CV were 0.080 and 0.030 μg L−1, respectively. The proposed method had been successfully applied to determine MG and CV in real water samples with recoveries ranging from 95.4 to 102.8%. Compared with the previous technologies, the proposed method required less extraction time (2 min), and provided lower detection limits and higher enrichment factors. Moreover, there were no volatile and hazardous organic solvents released. Based on these simple, environment friendly, rapid, and highly efficient results, the proposed approach provides a new and promising alternative for simultaneously extracting trace amounts of MG and CV from water.