Anaerobic digestion has been widely utilized to dispose of agricultural organic wastes. The renewable energy of methane can be produced during the treatment, together with the digestates rich in the nutrients for the fertilizer. However, the ammonia nitrogen can be tended to accumulate during anaerobic digestion, when using a large proportion of protein-rich substrates, such as chicken manure, pig manure, and kitchen wastes. Once the concentration of ammonia nitrogen reaches over 3 000 mg/L in the anaerobic process, the ammonia inhibition is likely to happen, resulting in the decrease of microorganisms’ activities and methane production during anaerobic digestion. Struvite precipitation can be a useful way to remove the ammonia nitrogen and phosphorus in the digestates and wastewater. Many studies have been reported to optimize the reaction conditions, such as the molar ratio of Mg to P, pH level, and temperature, to recover the struvite. However, there are only a few studies to combine struvite precipitation with anaerobic digestion. This study aims to investigate the effect of in-situ struvite precipitation on the anaerobic digestion of chicken manure. The MgCl2·6H2O and K2HPO4·3H2O were mixed into the feeding substrate in the stable running reactors for 6-7 consecutive days to remove NH4+-N. The theoretical removal rate was at the speed of 3 000 mg/d. Some parameters were detected, including the concentration of ammonia nitrogen, methane yield, total volatile fatty acids (TVFA), and pH during anaerobic digestion. After the first operation of adding MgCl2·6H2O and K2HPO4·3H2O, the concentration of ammonia nitrogen and TVFA were reduced from 2 937 to 1 466 mg/L, and 2 317 to 72 mg/L, respectively, whereas, the methane production was 0.39 L/gVS increased by 18%, compared with the control group (0.33 L/gVS), where the utilization rate of magnesium and phosphate was 91%. After the second operation, the concentration of ammonia nitrogen and TVFA were reduced from 2 232 to 762 mg/L, and 2 321 to 25 mg/L, respectively, whereas, the methane production was 0.33 L/gVS increased by 10% approximately, compared with the control group (0.30 L/gVS), where the utilization rate of magnesium and phosphorus was 90%. The results demonstrated that the addition of exogenous MgCl2·6H2O and K2HPO4·3H2O greatly contributed to mitigating the ammonia inhibition by struvite precipitation during the anaerobic digestion. An optimum pH was 8.5-9 for the struvite precipitation in the nutrient recovery of wastewater. A high utilization rate of magnesium and phosphorus was also achieved, when the pH of the system was 6.9-7.8, due to the high ammonia nitrogen concentration in the system. As such, it can be widely expected to promote the struvite precipitation to consume most of the magnesium phosphate salts. The exogenous MgCl2·6H2O and K2HPO4·3H2O can release H+ in the system, when the struvite was formed the lower pH to consume the alkalinity in the digester, easily leading to the acidification of anaerobic digestion. Consequently, the amount of exogenous MgCl2·6H2O and K2HPO4·3H2O needs to be controlled within a reasonable range for the stable anaerobic process. Anaerobic digestion has been widely utilized to dispose of agricultural organic wastes. The renewable energy of methane can be produced during the treatment, together with the digestates rich in the nutrients for the fertilizer. However, the ammonia nitrogen can be tended to accumulate during anaerobic digestion, when using a large proportion of protein-rich substrates, such as chicken manure, pig manure, and kitchen wastes. Once the concentration of ammonia nitrogen reaches over 3 000 mg/L in the anaerobic process, the ammonia inhibition is likely to happen, resulting in the decrease of microorganisms’ activities and methane production during anaerobic digestion. Struvite precipitation can be a useful way to remove the ammonia nitrogen and phosphorus in the digestates and wastewater. Many studies have been reported to optimize the reaction conditions, such as the molar ratio of Mg to P, pH level, and temperature, to recover the struvite. However, there are only a few studies to combine struvite precipitation with anaerobic digestion. This study aims to investigate the effect of in-situ struvite precipitation on the anaerobic digestion of chicken manure. The MgCl2·6H2O and K2HPO4·3H2O were mixed into the feeding substrate in the stable running reactors for 6-7 consecutive days to remove NH4+-N. The theoretical removal rate was at the speed of 3 000 mg/d. Some parameters were detected, including the concentration of ammonia nitrogen, methane yield, total volatile fatty acids (TVFA), and pH during anaerobic digestion. After the first operation of adding MgCl2·6H2O and K2HPO4·3H2O, the concentration of ammonia nitrogen and TVFA were reduced from 2 937 to 1 466 mg/L, and 2 317 to 72 mg/L, respectively, whereas, the methane production was 0.39 L/gVS increased by 18%, compared with the control group (0.33 L/gVS), where the utilization rate of magnesium and phosphate was 91%. After the second operation, the concentration of ammonia nitrogen and TVFA were reduced from 2 232 to 762 mg/L, and 2 321 to 25 mg/L, respectively, whereas, the methane production was 0.33 L/gVS increased by 10% approximately, compared with the control group (0.30 L/gVS), where the utilization rate of magnesium and phosphorus was 90%. The results demonstrated that the addition of exogenous MgCl2·6H2O and K2HPO4·3H2O greatly contributed to mitigating the ammonia inhibition by struvite precipitation during the anaerobic digestion. An optimum pH was 8.5-9 for the struvite precipitation in the nutrient recovery of wastewater. A high utilization rate of magnesium and phosphorus was also achieved, when the pH of the system was 6.9-7.8, due to the high ammonia nitrogen concentration in the system. As such, it can be widely expected to promote the struvite precipitation to consume most of the magnesium phosphate salts. The exogenous MgCl2·6H2O and K2HPO4·3H2O can release H+ in the system, when the struvite was formed the lower pH to consume the alkalinity in the digester, easily leading to the acidification of anaerobic digestion. Consequently, the amount of exogenous MgCl2·6H2O and K2HPO4·3H2O needs to be controlled within a reasonable range for the stable anaerobic process. [ABSTRACT FROM AUTHOR]