In recent years, ionic liquids have become increasingly attractive as ‘green solvents’ used in the extraction of bioactive compounds from natural plant. However, the separation of ionic liquid from the target compounds was difficult, due to their low vapour pressure and high stabilities. In our study, ionic liquid-based ultrasonic and microwave-assisted extraction was used to obtain the crude tannins, then the macroporous resin adsorption technology was further employed to purify the tannins and remove the ionic liquid from crude extract. The results showed that XDA-6 had higher separation efficiency than other tested resins, and the equilibrium experimental data were well fitted to Langmuir isotherms. Dynamic adsorption and desorption were performed on XDA-6 packed in glass columns to optimise the separation process. The optimum conditions as follows: the ratio of column height to diameter bed was 1:8, flow rate 1 BV/h (bed volume per hour), 85% ethanol was used as eluant while the elution volume was 2 BV. Under the optimised conditions, the adsorption and desoption rate of tannins in XDA-6 were 94.81 and 91.63%, respectively. The content of tannins was increased from 70.24% in Galla chinensis extract to 85.12% with a recovery of 99.06%. The result of ultra-performance liquid chromatography (UPLC)-MS/MS analysis showed that [bmim]Br could be removed from extract.