Time-periodic electroosmotic flow (EOF) with heterogeneous surface charges on channel walls can potentially be used to mix species or reagent molecules in microfluidic devices. Although significant research efforts have been placed to understand different aspects of EOF, its role in the mixing process is still poorly understood, especially for non-homogeneous surface charge cases. In this work, dynamic aspects of EOF in a cylindrical capillary are analyzed for heterogeneous surface charges. Closed form analytical solutions for time-periodic EOF are obtained by solving the Navier–Stokes equation. An analytical expression of induced pressure is also obtained from the velocity field solution. The results show that several vortices can be formed inside the microchannel with sinusoidal surface charge distribution. These vortices change their pattern and direction as the electric field change its strength and direction with time. In addition, the structure and strength of the vorticity depend on the frequency of the external electric field and the size of the channel. As the electric field frequency or channel diameter increases, vortices are shifted towards the channel surface and the perturbed flow region becomes smaller, which is not desired for effective mixing. Moreover, the number of vorticities depends on the periodicity of the surface charge.