The practical application of single atom catalysts (SACs) is constrained by the low achievable loading of single metal atoms. Here, nickel SACs stabilized on a nitrogen-doped carbon nanotube structure (NiSA-N-CNT) with ultrahigh Ni atomic loading up to 20.3 wt % have been successfully synthesized using a new one-pot pyrolysis method employing Ni acetylacetonate (Ni(acac)2) and dicyandiamide (DCD) as precursors. The yield and formation of NiSA-N-CNT depends strongly on the Ni(acac)2/DCD ratio and annealing temperature. Pyrolysis at 350 and 650 °C led to the formation of Ni single atom dispersed melem and graphitic carbon nitride (Ni-melem and Ni-g-C3N4). Transition from a stacked and layered Ni-g-C3N4 structure to a bamboo-shaped tubular NiSA-N-CNT structure most likely occurs via a solid-to-solid curling or rolling-up mechanism, thermally activated at temperatures of 700–900 °C. Extended X-ray absorption fine structure (EXAFS) experiments and simulations show that Ni single atoms are stabilized in the N-CNT structure through nitrogen coordination, forming a structure with four nearest N coordination shell surrounded by two carbon shells, Ni–N4. The NiSA-N-CNT catalysts show an excellent activity and selectivity for the electrochemical reduction of CO2, achieving a turnover frequency (TOF) of 11.7 s–1 at −0.55 V (vs RHE), but a low activity for the O2 reduction and O2 evolution reactions, as compared to Ni nanoparticles supported on N-CNTs.