To develop more effective adsorbents for the unmetabolized antibiotics discharged to water, a series of novel nitrogen, oxygen and phosphorus ternary-doped porous carbon (NOPPC) are prepared and employed to adsorb the pharmaceutical norfloxacin (NOR). Results indicate that the prepared NOPPC2, NOPPC3 and NOPPC4 with their maximum adsorption capacities of 384.62, 884.96 and 917.43 mg/g exhibit remarkably superior adsorption performances to the reported NOR adsorbents, showing a promising practical application for the NOR adsorption from antibiotic-polluted water. Meanwhile, correlations between the adsorption capacity and the changes of N, O and P moieties, defects, pore volumes and area further reveal that the dedoping of some O and P moieties would create the defects, micro- and mesopores in NOPPC, providing a new approach to design more efficient carbon-based porous adsorbents by doping and dedoping with some moieties such as COO/OCO and CPO.