Abstract:N, O in-situ co-doped hierarchical porous carbons (RPCs) were prepared by one-step method using aromatic amine waste residue produced in industrial production as carbon precursor and magnesium acetate as magnesium oxide template precursor. The morphology and pore structure of the materials were characterized by SEM and N2 physical adsorption and desorption, and the doped N and O species were analyzed by XPS. RPC-1.00 prepared at a mass ratio of 1.00 has a specific surface area of 1427 m2/g and a pore volume of 1.4713 cm3/g. Under the combined action of excellent specific surface area, abundant pore structure and N, O doped species, the static adsorption capacity of RPC-1.00 for p-nitrophenol can reach 562.66 mg/g, and the dynamic adsorption capacity of fixed bed can reach 345.01 mg/g. Theoretical calculations show that the incorporation of N and O atoms can increase the dispersion force and electrostatic attraction of the adsorption system, which can effectively improve the adsorption energy. Pyridine-N4 and carboxyl structure can also produce strong hydrogen bonding force, enhance the adsorption capacity.