Based on the recent concern on the pollution of water bodies with herbicides, adsorptive removal of typical herbicides with similar chemical structures, e. g. clofibric acid (CLFA), methylchlorophenoxypropionic acid or mecoprop (MCPP) and 2,4-dichlorophenoxyacetic acid (2,4-D) from water was studied using a porous nitrogen-enriched carbon. To prepare the nitrogen-enriched carbon, pyrolysis of a melamine (MLM) incorporated metal-azolate framework-6 (MLM(x)@MAF6; x = 0–50 M % of the ligand 2-ethylimidazole for MAF6), that was prepared for the first time via an in situ method, was carried out. The MLM(x)@MAF6-derived carbons (MDC6M(x)s) were characterized and used in the removal of CLFA, MCPP and 2,4-D from water. We found that the MDC6M(25), obtained from MLM(25)@MAF6 with 25% MLM (as the optimum precursor composition), showed the highest maximum adsorption capacity (Q0) of 1031 mg/g for CLFA, compared with any reported adsorbents, so far. The physicochemical properties of CLFA, as well as adsorbents and adsorptions under wide pH conditions, were employed to propose a plausible adsorption mechanism including hydrogen bonding. Remarkably, the porous carbon with enriched nitrogen, derived from MAF6 loaded MLM via in situ method, was very competitive in herbicides adsorption because of the contribution of well-dispersed nitrogen sties on the adsorbent. Finally, MDC6M(25) was suggested as a potential adsorbent for the removal of herbcides, including CLFA, MCPP and 2,4-D, from water, which is highly attractive to mitigate the environmental issue, especially, water pollution by various herbicides.