Abstract In this work, an ordered mesoporous titania film was introduced to coat a capillary by means of the sol–gel technique. Its electroosmotic flow (EOF) property was investigated in a variety of nonaqueous media (methanol, formamide and N, N′-dimethylformamide and mixtures of methanol and acetonitrile). The titania-coated capillary exhibited a distinctive EOF behavior, the direction and magnitude of which were strongly dependent on various parameters such as the solvent composition, apparent pH (pH *) and the electrolytes. The nonaqueous capillary electrophoresis separation of several alkaloids was investigated in the positively charged titania-coated capillary. Comparison of separation between coated and uncoated capillaries under optimal nonaqueous conditions was also carried out.