Biowaste materials could be considered a renewable source of fertilizer if methods for recovering P from waste can be developed. Over the last few decades, there has been a high level of interest in using biochar to remove contaminants from aqueous solutions. This study was conducted using a range of salts that are commonly found in biogas slurry (ZnCl2, FeCl3, FeCl2, CuCl2, Na2CO3, and NaHCO3). Experiments with a biogas digester and aqueous solution were conducted at pH nine integration with NH4+, Mg2+, and PO43− molar ratios of 1.0, 1.2, and 1.8, respectively. The chemical analysis was measured to find out the composition of the precipitate, and struvite was employed to remove the aqueous solutions. The study found that the most efficient removal of phosphate and ammonium occurred at pH nine in Tongan sludge urban biochar and rice biochar, respectively. Increasing the concentration of phosphate and ammonium increased the phosphate and ammonium content. Moreover, increasing the biochar temperature and increasing the concentration of phosphate and ammonium increased the efficiency of the removal of ammonium and phosphate. The removal efficiency of ammonium and phosphate increased from 15.0% to 71.0% and 18.0% to 99.0%, respectively, by increasing the dose of respective ions K+, Zn2+, Fe3+, Fe2+, Cu2+, and CO32.The elements were increased from 58.0 to 71.0 for HCO3− with the increasing concentration from 30 mg L−1 to 240 mg L−1.This study concluded that phosphate and ammonium can be recovered from mushroom soil biochar and rice biochar, and phosphate can be effectively recovered via the struvite precipitation method.