Industrial by-products are stored in large quantities in the open, leading to wasted resources and environmental pollution, and the natural environment is similarly faced with phosphate depletion and serious water and soil pollution. This study uses these by-products to produce a new sludge/biomass ash ceramsite that will be used to adsorb nitrogen and phosphorus from wastewater, and solidify heavy metals in the soil while releasing Olsen P. The sludge/biomass ash ceramsites are made using sewage sludge and biomass ash in a certain ratio calcined at high temperatures and modified for the adsorption of nitrogen and phosphorus from wastewater. Sludge/biomass ash ceramsites before and after phosphorus adsorption, biochar and biomass ash were compared to analyze their heavy metal adsorption capacity and potential as phosphate fertilizer. After phosphorus adsorption, the sludge/biomass ash ceramsites released effective phosphorus steadily and rapidly in the soil, with a greater initial release than biochar and biomass ash, and the ceramsites were in a granular form that could be easily recycled. Biochar and biomass residue, due to their surface functional groups, are better at solidifying heavy metals than sludge/biomass ash ceramsites. Biochar, biomass ash and sludge/biomass ash ceramsites significantly reduced the concentrations of Cd, Cu, Pb and Zn in the soil. Correlation analysis demonstrated that there was a synergistic relationship between the increase in soil Olsen P content and the change in pH, with the increase in soil Olsen P content and the increase in pH contributing to heavy metal solidification.