The catalytic conversion of CO2 into high value‐added chemical products driven by electricity was an effective strategy to reduce atmospheric CO2 concentration. The development of high efficiency catalysts had always been the core for electrocatalytic reduction of CO2. The single transition metal sites anchored on nitrogen‐doped carbon showed great potential in CO2 reduction reaction (CO2RR). In this paper, the atomically dispersed Ni−N sites are constructed on the two‐dimensional mesoporous carbon nanosheets by the secondary pyrolysis method. The rich mesoporous structure of the two‐dimensional nanosheets is beneficial to CO2 diffusion and adsorption during CO2RR, and the high nitrogen contents could increase the Ni single atom loadings. The nitrogen content and type could be controlled by regulating the ratio of nitrogen source to carbon source, and the catalyst activity is improved as the proportion of nitrogen sources increases. When the ratio of nitrogen source to carbon source is four, the oxidation state of Ni single atoms Ni@NMCN4 is between 0 and +2, and Ni single atoms exists as Ni−N4 structure with pyridinic N of 32.78 %, which exhibits the best electrochemical CO2RR activity. The active site of Ni@NMCN4 is confirmed as the highly stable Ni single atoms. Moreover, the pyridinic N species are proved to play an important role in enhancing the CO2 electroreduction performance. This work provides a new perspective to adjust the nitrogen content and type in transition metal monatomic‐N‐doped carbon electrocatalysts for CO2RR.