Cordycepin is the main active metabolite of Cordyceps militaris extracts; according to recent studies it has interesting therapeutic activities. A new capillary electrophoresis (CE) procedure with UV detection at 254 nm for determination of cordycepin was developed and optimized. Optimal conditions found were 20 mM sodium borate buffer with 28.6% methanol, pH 9.5, separation voltage 20 kV, hydrodynamic injection time 10 s and temperature 25 °C. Linearity was found over the 20–100 μg/mL concentration ranges of cordycepin. The developed method has been applied for determination of cordycepin in various pharmaceutical products. A comparison was made between CE and a high performance liquid chromatography (HPLC) method. Both of these methods gave comparable results. The shorter analysis time and low running cost are the main advantages of CE method.