O-Nitrophenol(ONP) industrial wastewater causes serious harm to human body and aquatic environment. In this paper, we adopted a recycled MgO template preparation strategy to design series of semicoke derived hierarchical porous carbons. The prepared samples were characterized by N2 adsorption and desorption and scanning electron microscope. The analysis showed that the HPC-1 had a high specific surface area of 723.3m2/g with a huge pore volume of 1.64 cm3/g and exhibited remarkable adsorption capacity of 503.02 mg/g in batch adsorption test for ONP. Adsorption isotherms and adsorption kinetics revealed the adsorption mechanism of ONP molecules on HPCs surfaces, which followed the langmuir monolayer adsorption and pseudo-second-order kinetic. Furthermore, the HPC-1 exhibited good reusability and recycling performance, reflecting its great potential in practical application.