The invention belongs to the technical field of energy storage materials, relates to a nitrogen-doped carbon/nickel/nickel oxide nanocomposite preparation method, is used for supercapacitor electrodematerial preparation occasions, and solves the problem that a traditional technology has many preparation steps and costs long time and low compound specific capacitance is not conducive to material application. A crosslinked polyacrylamide of a 3D structure/nickel salt aerogel are used as a precursor and a self-template, through calcination treatment, in-situ nitrogen doping and catalytic graphitization of the carbon material are realized and a three-dimensional hierarchical porous structure is formed, nickel nanoparticles are uniformly distributed in a carbon matrix, a metal elementary substance surface layer is oxidized to nickel oxide, a ternary composite material is formed, the preparation technology is simple in steps, is energy-saving and environment-friendly, the principle is reliable, a product has the high specific surface area of the carbon material, high conductivity of metallic nickel, typical pseudocapacitance characteristics of nitrogen-doped carbon and nickel oxide, andthe composite material has excellent electrochemical performance, is environment-friendly in use, and thus has good economic benefits and broad market prospects.