In a magnesium electrolysis cell, the electrolyte flow pattern can be affected by the chlorine gas bubbles release from the anodes. A 2D gas‐liquid mathematical model was developed to simulate the liquid velocity and gas volume fraction. A Particle Image Velocimetry (PIV) experimental set‐up was employed to determine the characteristics of velocity field in a cold model and to validate the mathematical model. The numerical results show good agreement with the experimental data. The local production rate of gas evolution is related to the anode current density according to Faraday's law. To make the bubble generation close to the reality, the non‐uniform current density distribution over the anode surfaces, derived from the thermoelectric model, has been added to the gas‐liquid model as initial boundary conditions. According to the analysis, the use of non‐uniform conditions is necessary. The flow patterns in the side channels are found to be quite different from that in the middle channels, where the velocity is much lower. It is noted that both current intensity and bubble size can significantly affect the velocity field and gas volume fraction distributions. The velocity can be increased with higher current intensities and larger bubble size, and the gas volume fraction can be enhanced with higher current intensities and lower bubble diameters. Additionally, the liquid velocity will decrease sharply when the bubble diameter smaller than the critical value (0.9 mm). It is better to keep the bubble diameter larger than the critical size for the electrolyte circulation.