Superior electrochemical activity with adequate electronic properties by the incorporation of nitrogen doping in carbon anode materials presents a promising prospect for the advancement of rechargeable batteries. However, the structure of two-dimensional (2D) nitrogen-rich carbon still limits the practical achievement of this concept. In order to overcome this issue, a “bottom-to-up” strategy is being presented which involved the development of highly nitrogen-doped carbon nanosheets (NDCSs) using a Cu-melamine coordination framework as a precursor. For the reinforcement of carbon framework during carbonization by utilizing the surface curing agent of hexamethylenetetramine, Cu2+ melamine coordinated with melamine molecule in order to build a 2D structure. Precise control of carbonizing temperature delivers command over lamellar thickness, crystallinity, nitrogen configuration and content (8.05–29.49 at.%). Consequently, the optimized sample brings considerable capacities of 871.1 and 258.8 mAh g−1 at 0.05 A g−1 for Li+ and Na+ storage, respectively, as well as high-rate performance (299.6 and 66.7 mAh g−1 at 10 A g−1) is achieved. This work will open a new pathway for the successful manufacturing of nitrogen-rich carbon nanosheets for energy storage applications.