The microalgal-bacterial granular sludge (MBGS) process, enhanced with sodium bicarbonate (NaHCO3), offers a sustainable alternative for wastewater treatment aiming for carbon neutrality. This study demonstrates that NaHCO3, which can be derived from the flue gases and alkaline textile wastewater, significantly enhances pollutant removal and biomass production. Optimal addition of NaHCO3 was found to achieve an inorganic-toorganic carbon ratio of 1.0 and a total carbon-to-nitrogen ratio of 5.0. Metagenomic analysis and structural equation modeling showed that NaHCO3 addition increased dissolved oxygen concentrations and pH levels, creating a more favorable environment for key microbial communities, including Proteobacteria, Chloroflexi, and Cyanobacteria. Confocal laser scanning microscopy further confirmed enhanced interactions between Cyanobacteria and Proteobacteria/Chloroflexi, facilitating the MBGS process. These microbes harbored functional genes (gap2, GLU, and ppk) critical for removing organics, nitrogen, and phosphorus. Carbon footprint analysis revealed significant reductions in CO2 emissions by the NaHCO3-added MBGS process in representative countries (China, Australia, Canada, Germany, and Morocco), compared to the conventional activated sludge process. These findings highlight the effectiveness of NaHCO3 in optimizing MBGS process, establishing it as a key strategy in achieving carbon-neutral wastewater treatment globally.