Nitrogen-doped hierarchical porous carbon materials are prepared through nitrogen-doping,pre-carbonization and chemical activation methods using corncob,a kind of widely sourced agricultural waste,as carbon precursor,and potassium hydroxide as activator.In addition,a nitrogen doping strategy is adopted by using melamine as main nitrogen source.Results show that the prepared porous carbon material has the highest specific surface area of 3 639 m2·g-1 and pore volume of 1.96 cm3·g-1 when the activation temperature is 800° C and the mass ratio between melamine and pre-carbonized biochar is 1∶1.Compared with other nitrogen sources,melamine is beneficial for the uniform doping of nitrogen atoms in carbon materials and the formation of hierarchical porous structure in carbon materials.As an electrode material,this porous carbon material obtains a high specific capacitance of 342 F·g-1 at 0.5 A·g-1 in a three electrode system,and its specific capacitance still reaches 303 Feg 1 at 10A·g-1.Ina two-electrode system,the energy density of the prepared porous carbon material reaches 32.3 Wh·kg-1 at 500 W·kg-1.After having experienced 10 000 charge and discharge cycles at 10 A·g-1,the device made from the carbon material has a capacitance retention rate of 82.2%.