In this paper, nitrogen-doped (ND) and nitrogen-magnesium co-doped (NMD) chars were synthesized by different combinations of pyrolysis-activation steps of anaerobically digested fiber (ADF), wheat straw (WS), and Douglas fir wood (DFW) to adsorb phosphate from aqueous solutions. Five different series of char were produced through different methods: (1) biomass pyrolyzed under N2, (2) biomass pyrolyzed under N2 followed by activation with ammonia, (3) biomass pyrolyzed and char activated both in the presence of NH3, (4) biomass impregnated with MgCl2 pyrolyzed under N2, and (5) biomass impregnated with MgCl2 pyrolyzed under NH3. Proximate analysis, elemental composition, gas physisorption, inductively coupled plasma mass spectrometry (ICP-MS), X-ray photoelectron spectroscopy (XPS), X-ray powder diffraction (XRD), Fourier-transform infrared spectroscopy (FTIR), scanning electron microscopy (SEM), and energy-dispersive X-ray spectroscopy (EDS) techniques were used to characterize the resulting chars. All the chars derived from ADF (independent of the procedure used) showed the best phosphate adsorption capacity, likely due to their higher ash content. Pyrolysis of ADF under NH3 resulted in char with phosphate adsorption capacity of 95 mg/g (254% higher than char produced under N2). Results from kinetic study show almost all phosphate adsorption by ND-ADF (one step) char occurred within 2 h. Richie nth-order model fits well the sorption process indicating that phosphate adsorption on the surface of the ND-ADF (one step) char was mediated by multiple mechanisms. Equilibrium data were fitted to different adsorption isotherms and the Langmuir-Freundlich and Redlich Peterson adsorption models provided the best fit. We hypothesized that the presence of Ca and Mg in the ADF enhanced N fixation and leads to higher phosphate adsorption. Therefore, we studied the effect of MgCl2 impregnation on DFW and WS pyrolyzed and activated under NH3. Our hypothesis was confirmed, and DFW and WS chars doped with Mg and N showed phosphate adsorption of 216 and 122 mg/g, respectively (37- and 24-fold increase compared with chars produced only under N2).