Microbial electrochemical CO2 reduction and in-situ biogas upgrading can effectively reduce the CO2 content in biogas produced during anaerobic digestion, thereby reducing CO2 emissions and achieving carbon reduction. pH is an important indicator in this process as it can significantly change the solubility and forms of CO2 in the aquatic phase. This study comprehensively evaluated the optimal pH value from the perspectives of methane upgrading performance and electron utilization efficiency and observed and analyzed the morphology of the biofilm on the electrode surface and the microbial community in the cathodic region under optimal conditions. The results showed that the optimal pH was 6.5; methane content reached ~88.3% in the biogas; methane production reached a maximum of 22.1 ± 0.1 mmol·d−1, with an increase in methane production compared to the control group reaching a maximum of 1.7 mmol·d−1; and CO2 conversion rate reached ~22.9%. A dense biofilm with a thickness of 51.3 μm formed on the electrode surface, with Methanobacterium being the dominant genus, with a high relative abundance of 69.3%, and Geobacter had a relative abundance of 20.1%. The above findings have important guiding significance for the practical application of methane upgrading.