The invention discloses a method for producing a composite porous material containing metal-carbon-nitrogen. The method comprises the following steps: a compound containing metal M and an organic ligand compound raw material are mixed, or respectively dissolved in a solvent, wherein, the metal M is transition metal or a transition metal mixture from a periodic table of elements, the organic ligand compound at least contains nitrogen and carbon, the solvent at least comprises at least one of compounds containing a general formula of CxHyOmNnSz, wherein x, y, z, m and n are integer, x is greater than or equal to 0, y is greater than or equal to 0, m is greater than or equal to 0, n is greater than or equal to 0, z is greater than or equal to 0, and all of x, y, z, m and n cannot represent 0; the raw materials are added in the solvent and are uniformly mixed, or the raw materials are respectively dissolved in the solvent and the raw material solutions are uniformly mixed, after a synthesis reaction, the products are separated, washed, and dried to obtain the composite porous material containing metal-carbon-nitrogen. The composite porous material has high capacity, excellent multiplying power performance, excellent cycling stability, and good low-temperature performance.