A capillary electrophoresis method was developed for the quantification of tetrahydropalmatine in the medicinal herbs Rhizoma corydalis by using ionic liquid as electrolyte.The effects of several parameters such as ionic liquid concentration,pH value and applied voltage on the separation efficiency were investigated.The separation mechanism was also discussed.Under the optimal conditions,using pH 7.150 mmol/L 1-butyl-3-methylimidazolium tetrafluoroborate(BF4) as electrolyte,applied voltage of 20 kV and detection wavelength of 254 nm,tetrahydropalmatine was successfully separated from extracts of Rhizoma corydalis in 5 min.A good linearity was observed in the range of 31.25-500 mg/L with a detection limit of 4.86 mg/L.The intra-day RSD was 0.18% for migration time and 0.46% for peak area.The inter-day RSD was 2.65% for migration time and 3.24% for peak area.The recoveries of tetrahydropalmatine ranged from 95% to 102%.