Biogas upgrading to natural gas quality is essential for the efficient use of biogas in various applications. Carbon dioxide (CO2) which constitutes a major part of the biogas is generally removed by physicochemical methods. However, most of the methods are expensive and often present environmental challenges. In this study, an innovative microbial electrolytic system was developed to capture, separate and regenerate CO2 for biogas upgrading without external supply of chemicals, and potentially to treat wastewater. The new system was operated at varied biogas flow rates and external applied voltages. CO2 was effectively separated from the raw biogas and the CH4 content in the outlet reached as high as 97.0±0.2% at the external voltage of 1.2 V and gas flow rate of 19.6 mL/h. Regeneration of CO2 was also achieved in the regeneration chamber with low pH (1.34±0.04). The relatively low electric energy consumption (≤0.15 kWh/m3) along with the H2 production which can contribute to the energy input makes the overall energy need of the system low, and thereby makes the technology promising. This work provides the first attempt for development of a sustainable biogas upgrading technology and potentially expands the application of microbial electrochemical technologies.