Highly developed porous materials are urgently needed for the efficient remediation of contaminated environments. However, their preparation methods are extremely limited, and new production processes have always been a research focus. In this study, a green and efficient sequential carbonization method was proposed to prepare excellent porous biochar from bamboo waste; the sequential steps were hydrothermal carbonization, potassium/calcium formate-assisted prepyrolysis, and urea-assisted postpyrolysis. The specific surface area reached 3921 m2/g, which is much greater than that of reported porous materials, and the pore volume reached 1.87 cm3 g−1. Moreover, the nitrogen content was as high as 2.04 %. The developed nitrogen-doped porous biochars (NPBs) were applied to the sorption of a typical plasticizer, diethyl phthalate, from water. The surface sorption quantity dominated the entire sorption capacity. The maximum sorption amount was 823.46 mg g−1. Pore filling, partitioning, hydrogen bonding and π-π stacking are possible sorption mechanisms. In addition, the stable properties of NPBs have great potential for recycling. This work has developed a high-value, green method to prepare excellent porous materials with great promise for the sorption of pollutants and could be further applied in the fields of catalysis, energy storage, and filtration.