Excess sludge is rich in organic matter but also contains heavy metals, pathogens, and harmful substances. In this study, hydroaluminite and excess sludge were used as raw materials to reduce the risk of heavy metals leaching from sludge by coagulation and co-pyrolysis, and its phosphate adsorption characteristics were studied. The results showed that the leaching amount of Zn, Cu, Cd, and Ni in sludge biochar decreased with the increase in the hydroaluminite dosage. The sludge biochar composite (1:1HB800), prepared by co-pyrolysis of hydroaluminite and excess sludge with a mass ratio of 1:1 as well as rich in calcium and aluminum, had lowest leaching risk of heavy metals and showed the high adsorption capacity for phosphate. The process could be fitted by the Langmuir adsorption isotherm (R2=0.93), and the maximum phosphate adsorption capacity at 25℃ was 51.38 mg·g-1. The pseudo second-order kinetic model could well describe the adsorption process of 1:1HB800 for high concentration phosphate, and its adsorption rate was controlled by both surface adsorption and particle diffusion. Compared with that in the neutral solution, 1:1HB800 had better phosphate capacity in the acidic and alkaline aqueous solutions, which was related to the leaching amount of calcium/aluminum in 1:1HB800 and the existence form of aluminum under the different pH conditions. FTIR, XRD, SEM, zero potential point, and Ca2+/Al3+ leaching experiments indicated that the main adsorption mechanisms for phosphate by 1:1HB800 were co-precipitation (interaction between Ca2+/Al3+ and phosphate), ligand exchange (hydroxyl), and electrostatic interaction. Therefore, 1:1HB800 can provide a feasible alternative for the removal of phosphate in aqueous solutions and also provide a potential new method for the resource utilization and harmless treatment of excess sludge.