Regulating the spin states in transition-metal (TM)-based single-atom catalysts (SACs), such as the TM-Nx-C configurations, is crucial for improving the catalytic activity. However, the role of spin in single Ni atoms facilitating the electrochemical CO2 reduction reaction (CO2RR) has been largely overlooked. Using first-principles simulations, we investigated the electrocatalytic performance of Ni-N4-C SACs vertically stacked on the O-terminated MXene nanosheets for the CO2RR. The terminated O atoms on MXene axially interact with the Ni atom due to significant charge transfer between them. Unlike the pure Ni-N4 site, which lacks spin polarization, the newly formed Ni-N4O configuration breaks the spin degeneracy of Ni d orbitals, dramatically lifting the energy level of spin-down d orbitals relative to that of spin-up d orbitals. As a result, the d electrons of Ni in the two spin channels are rearranged, leading to large net spin moments of 1.4 μB. Compared to the Ni-N4 site, the partially filled minority-spin dz2 orbitals of Ni on Ni-N4O weaken the occupied d-π* orbitals between Ni and *COOH, significantly stabilizing the key intermediate. The detailed reaction mechanisms and energetics show that four MXenes, namely, Hf3C2, Zr3C2, Hf2C, and Zr2C, can induce a large spin on the Ni site, thereby improving catalytic activity for CO2 reduction to CO, with a lower onset potential of about -0.75 V vs SHE compared to pure Ni SACs (-1.17 V) according to the potential-constant model with an explicit solvent environment.