A novel method for the determination of ephedra alkaloids (methylephedrine and pseudoephedrine) was developed by electrophoresis capillary (CE) separation and electrochemiluminesence detection (ECL). The use of ionic liquid (1-butyl-3-methylimidazolium tetrafluoroborate, BMIMBF(4)) improved the detection sensitivity markedly. The conditions for CE separation, ECL detection and effect of ionic liquid were investigated in detail. The two ephedra alkaloids with very similar structures were well separated and detected under the optimum conditions. The limits of detection (signal-to-noise ratio = 3) in standard solution were 1.8 x 10(-8) mol/L for methylephedrine (ME) and 9.2 x 10(-9) mol/L for pseudoephedrine (PSE). The limits of quantitation (signal-to-noise ratio = 10) in human urine samples were 2.6 x 10(-7) mol/L for ME and 3.6 x 10(-7 )mol/L for PSE. The recoveries of two alkaloids at three different concentration levels in human urine samples were between 81.7 and 105.0%. The proposed method was successfully applied to the determination of ME and PSE in human urine and the monitoring of pharmacokinetics for PSE. The proposed method has potential in therapeutic drug monitoring and clinical analysis.