Lithium-ion batteries (LIBs) have already gained significant attention because they have satisfactory energy density and no memory effect, making them one of the most widely used energy storage systems. In commercial LIBs, graphite is widely used as an anode material due to its excellent electrical conductivity and structural stability; however, as they are limited by their restricted theoretical capacity, there is an urgent need for the development of novel anode materials for LIBs. For this purpose, we designed a nitrogen-doped two-dimensional layered porous carbon material (2D-PNC) based on a covalent organic framework (COF) generated by a Schiff base reaction as a precursor. The characterization analysis results show that 2D-PNC is made of stacked two-dimensional ultra-thin carbon sheets with a porous structure. This unique structure is beneficial for electrolyte impregnation and lithium-ion storage, resulting in excellent electrochemical performance of 2D-PNC, which shows a high specific capacity of 573 mAh g−1 after 380 cycles at 0.5 A g−1. The results show that 2D-PNC provides the possibility of a practical application of high-performance lithium-ion batteries.