Developing efficient non-precious-metal catalysts capable of selectively converting CO2 into fuels and chemicals is desirable yet remains a challenge. Ni-based catalysts usually exhibit high activity in methanation reactions but low selectivity and stability in the reverse water-gas shift (RWGS) reaction. Herein, we report a Ni single-atom catalyst with Ni–Nx motifs confined in N-doped carbon nanotubes as an active, selective, and stable catalyst for the RWGS reaction, achieving almost 100% CO selectivity with a STY of 1.88 molCO gNi–1 h–1 at 500 °C and atmospheric pressure. In addition to weak CO adsorption, strong CO2 adsorption and weak H2 adsorption at the Ni–Nx active site were found to be responsible for the high catalytic activity and CO selectivity.