A simple, rapid, and accurate method for the separation and determination of ephedrine and pseudoephedrine using direct UV absorbance detection has been developed by the combination of flow injection with capillary electrophoresis for the first time. The buffer solution used is a 40mM borate solution with the pH adjusted to 9.5 using a 2M NaOH solution. The linear calibration range is 50 to1000 µg/mL (r = 0.9996) for both analytes, and the recoveries are 91.2–108.2% for ephedrine and 92.6–107.3% for pseudoephedrine, respectively. The relative standard deviation of the peak area is 1.6% for ephedrine and 1.3% for pseudoephedrine (n = 6) at a concentration of 500 µg/mL, respectively. A series of samples is injected repeatedly without current interruption and subsequent rinsing, and the contents of these two alkaloids in three marketed drugs and the medical plant, Ephedra sinica, are determined with satisfactory results by this method.