In this study, an agricultural residue-derived biochar was fabricated by pyrolyzing coffee shells using (NH4)(3)PO4 pretreatment. The influence of pyrolysis temperature on the structure and properties of biochars was investigated. The elemental analysis, spectroscopic and textural studies showed that the biochars were endued sufficient N and P co-doping and large specific surface area by (NH4)(3)PO4-pretreatment. The appraisement for remedying aqueous Cr(VI) contaminants demonstrated that the N/P co-doped biochars offered high efficiencies above 95% for aqueous Cr(VI) removal. The mechanism investigation displayed that the adsorption and reduction of Cr(VI) were boosted by the synergistic effect between the hierarchical pore structure and the groups related to oxygen, nitrogen and phosphorus. Moreover, the biochar can be readily regenerated by HCl solution soaking for reuses several times. This work should permit for providing a convenient utilization of coffee shell agricultural residues, and the coffee shell-derived biochars supplied potential for remedying Cr(VI) in effluents.