The roles of graphitization degree and surface functional groups of N-doped activated biochar are key concerns for phenol removal from wastewater. In this study, N-doped activated biochars with different doping ratios and activation levels were prepared to adsorb phenol. As the doping ratio rises, the surface N content and ID/IG value increased, and the surface O content decreased. The adsorption capacities were 126.5–170.7 (high activation level) and 100.6–117.9 mg/g (low activation level), and declined with the increase of doping ratio. The density functional theory calculation results show that the surface functional groups are beneficial to phenol adsorption to different degrees. N-5-pyrrolic (−66.6 KJ/mol) and N-Q (−56.9 and −58.0 KJ/mol) groups play the most important role among N functional groups, followed by N-X (−54.6 and −56.6 KJ/mol) group, while the N-6 (−54.5) and N-5-pyridones (−52.5 KJ/mol) groups play the least important role. The phenol adsorption energies of biochar with –C[dbnd]O, –COOH and –OH are − 262.2, − 57.7 and − 53.2 KJ/mol, respectively. With the degree of graphitization decreases, the adsorption energy first increase then dramatically declines which implies a mildly defect in the graphite structure is beneficial to adsorption, but serious defect is harmful even with the help of functional groups. Therefore, the declined adsorption performance of biochar with higher doping ratio is due to the decrease of surface O content and graphitization degree. This study offers theoretical support for the target regulation of biochar with high adsorption performance for wastewater treatment.