The recent advances of capillary electrophoresis (CE) provide a rapid, economic, simple, and highly efficient separation method, one of them, on-line sample preconcentration is considered to be the most convenient way for improving detection sensitivity, because it can be easily accomplished by carefully controlling the operation conditions on a commercially available CE instrument equipped with a UV detector. In this paper, an on-line transient moving chemical reaction boundary (MCRB) method for simply but efficiently stacking analytes in capillary electrophoresis (CE) was presented. The CE technique was developed for a rapid determination of fumaric and maleic acid. Based on the theory of MCRB, Effects of several important factors such as the pH and concentration of running buffer and the conditions of stacking analytes were investigated to acquire the optimum conditions. The optimized separations were carried out in a 20 mmol/L sulphate neutralized with ethylenediamine to pH 6.0 electrolytes using a capillary coated with poly (diallyldimethylammonium chloride) and direct UV detection at 214 nm. The optimized preconcentrations were carried out in 50 mmol/L borax (pH 9.0). The calibration curves were linear in the concentration range of 1.0×10−7–1.0×10−4 mol/L and 5.0×10−7–1.0×10−4 mol/L for fumaric and maleic acid with correlation coefficients higher than 0.9991. The detection limits were 5.34×10−8 mol/L for fumaric acid and 1.92×10−7 mol/L for maleic acid. This method was applied for determination of fumaric acid in apple juice and of fumaric and maleic acid in dl-malic, the recovery tests established for real samples were within the range 95–105%. This work provided a valid and simple approach to detect fumaric and maleic acid.