The capillary electrophoretic separation of anions using direct UV detection was studied. The separation conditions, such as carrier electrolyte, pH and concentration of electroosmotic modifier, were optimized. The carrier electrolyte co-ion affected the peak shape because electromigration dispersion was non-negligible. An unsuitable anion form of the electroosmotic flow modifier would cause negative peaks on the separation baselines when the samples contain high concentrations of salts, and the separation could be adversely affected. In this work, sodium chloride with 2.0 m M tetradecyltrimetylammonium bromide was used as the carrier electrolyte solution, and a good separation was achieved. Taking sodium chloride to represent salts in samples, the experimental results showed that the peak height and width of a detected anion were affected by the ratio of sodium chloride concentration between the carrier electrolyte solution and sample, and correspondingly the detection limit and separation efficiency of the anion were also affected. The principle of electrostacking was used to explain this phenomenon theoretically. The reproducibility of migration time, peak height and peak area under different conditions was also examined.