Carbon dioxide (CO2) capture is a crucial negative-emission technology for the mitigation of climate change and global warming. The urgent need of combating climate change motivates the research and development of economical, effective and environmentally benign processes for CO2 capture. Herein, we design and report a flow cell for the CO2 capture from air or flue gas in a precipitate-free and closed-loop manner. No ion-exchange membrane is used in the electrolyser. The water electrolysis produces acidic solution near the anode and alkaline solution near the cathode, while generating valuable hydrogen and oxygen byproducts. The dilute CO2 in air or flue gas is captured by the alkaline solution, which is then mixed with the acidic solution to release the concentrated CO2. The process operates in a cyclic manner as driven by the water electrolysis and the mechanical pumping. No precipitation of calcium carbonate is involved for fixing CO2, which may simplify the separation process and minimizing the materials loss. The simple process enabled by electrochemical pH gradient shows promise for efficient CO2 capture on both small and large scales.