Producing an ideal sorbent for removing heavy metals from aqueous solutions is still very challenging. A well-organized microporous structure and nitrogen-rich functional groups in a sorbent are proposed as an excellent platform for Cd(II) removal. Urea phosphate (UP) was used as an activating agent for preparing carbon sorbents derived from biomass. The activating procedure was examined by thermogravimetric analysis (TGA), which indicated that a well-developed microporous structure and nitrogen-rich functional groups were present in the sorbents due to the UP with urea and phosphoric acid molecules in its chemical structure and liberated in the activation process. The mechanisms of Cd(II) removal by sorbents were determined by X-ray photoelectron spectroscopy (XPS), which indicated that porous filtration and chemical reactions (ion exchange, electrostatic attraction and surface complexation) were involved in Cd(II) removal.