In this research, preparation of waste-derived nanoporous carbon from Iranian asphaltene (IANC),which was further tuned and engineered to exceptionally adsorb amoxicillin (AMX) and metronidazole (MNZ)antibiotics, is reported.Structural tuningand surface modification of IANCswere carried out viamelamine treatment and vapor functionalization(i.e., –COOH and –NH2), respectively.The M-IANC-3 as a superior melamine-modified adsorbent exhibited 43.8%higher mesoporosity compared with that of the pristine one (i.e., P-IANC-3), offering the maximum surface area (2693 m2/g), total pore volume (1.72 cm3/g) and mesopore volume (1.61 cm3/g), which correlated well with its high adsorption capacity of AMX (623 mg/g) and MNZ (447.8 mg/g). Furthermore, the amine functionalized IANC sample (i.e., IANC-NH2) impressively exhibited ultra-high AMXand MNZ adsorption capacity of 860.6 and 536.5 mg/g, respectively,through hydrogen binding. Density functional theory calculations also confirmed that the functionalization of IANC with -NH2 group can greatly enhance the adsorption energy of AMX and MNZ due to more favorable electrostatic and charge-transfer effects. Overall, the results confirmed that the proposed process to optimize and tune the final properties of the adsorbent by melamine modification or amine functionalizingcan be efficiently employed to develophigh-performance nanoporous structures forantibiotic removal from wastewater effluents.