We report herein the in situ electrochemical scanning tunneling microscopy (ECSTM) study on the synergistic effect of Mg2+ in CO2 reduction reaction (CO2RR) catalyzed by cobalt phthalocyanine (CoPc). ECSTM measurement molecularly resolves the self-assembled CoPc monolayer on the Au(111) substrate. In the CO2 environment, high-contrast species are observed in the adlayer and assigned to the CO2 adsorption on CoPc. Furthermore, the contrast of the CO2-bound complex is higher in Mg2+-containing electrolytes than in Mg2+-free electrolytes, indicating the formation of the CoPc-CO2-Mg2+ complex. The surface coverage of adsorbed CO2 is positively correlated with the Mg2+ concentration as the additive in electrolytes up to a plateau of 30.8 ± 2.7% when c(Mg2+) > 30 mM. The potential step experiment indicates the higher CO2 adsorption dynamics in Mg2+-containing electrolytes than without Mg2+. The rate constants of CO2 adsorption and dissociation in different electrolytes are extracted from the data fitting of statistical results from in situ ECSTM experiments.