Phosphate (P)-modified biochar is a good material for cadmium (Cd) immobilization, and the pore-forming effect of potassium ions (K+) can favor the P loading on biochar. However, few studies have been done specifically on Cd(II) removal by composites of potassium phosphates with biochar, and the removal potential and mechanisms are not clear. Herein, apple tree branches, a major agricultural waste suitable for the development of porous materials, were pyrolyzed individually or together with KH2PO4, K2HPO4·3H2O, or K3PO4·3H2O to obtain biochars to remove Cd(II), denoted as pristine BC, BC-1, BC-2, and BC-3, respectively. The results showed that the orthophosphates containing more K+ enlarged the specific surface area, total pore volume and phosphorus loading of biochar. Co-pyrolysis of apple tree branches and P promoted the thermochemical transformation of P species. Only weak signal of orthophosphate was observed in the pristine BC, while the presence of orthophosphate, pyrophosphate and metaphosphate were detected in BC-1, and BC-2 and BC-3 showed the presence of orthophosphate and pyrophosphate. The maximum Cd(II) adsorption capacities of pristine BC, BC-1, BC-2 and BC-3 were 10.4, 88.5, 95.8, and 116 mg·g-1, respectively. Orthophosphate modification enhanced the Cd(II) adsorption capacity due to the formation of Cd-P-precipitates, namely Cd5(PO4)3Cl, Cd5(PO4)3OH, Cd3(PO4)2, Cd2P2O7, and Cd(PO3)2. Furthermore, higher cation exchange efficiencies between Cd(II) and K+ in P-modified biochars also contributed to their high Cd(II) adsorption capacity. Cd(II) removal by BC-3 from artificially polluted water bodies showed more than 99.98% removal rates. Application of BC-3 also reduced the diethylene triamine pentaacetic acid-extracted Cd(II) in soil by 69.1%. The co-pyrolysis of apple tree branches and potassium phosphates shows great prospect in Cd(II) wastewater/soil treatment and provide a promising solution for agricultural waste utilization and carbon sequestration.