NOVELTY - Livestock wastewater treatment method comprises adding livestock wastewater into centralized sewage collection tank, adjusting pH, adding into sewage digester, subjecting to anaerobic fermentation, discharging digester effluent into filtration tank, and filtering impurity; adding filtered wastewater into phosphorus recovery tank, adding magnesium, stirring, adjusting pH with sodium hydroxide, stirring, standing, adding into aeration tank, adjusting pH, and subjecting to aerobic treatment; and flowing effluent into wetland pond, performing macroporous resin adsorption, and discharging.    USE - Method for livestock wastewater treatment (claimed).    ADVANTAGE - The method effectively removes nitrogen and phosphorus at high rate, saves resources, utilizes planting flowers and Pennisetum purpureum which can absorb nitrogen, beautifies the environment and purifies air, increases amount of biogas produced during anaerobic treatment which can be used for household cooking and lighting saving lots of coal, natural gas and electricity, filters suspended solids that can be used as crop fertilizer reducing cost of planting farmers, uses non-woven fabric as biofilm for aerobic treatment which has low prices and long life, and has low cost and less labor.    DETAILED DESCRIPTION - Livestock wastewater treatment method comprises adding livestock wastewater into centralized sewage collection tank, adjusting pH to 6-8, adding into sewage digester, subjecting to anaerobic fermentation, discharging digester effluent into filtration tank, and filtering impurity; adding filtered wastewater into phosphorus recovery tank, adding magnesium at magnesium ion and nitrogen molar ratio of 1:1, stirring, adjusting pH of effluent to 9-10 with sodium hydroxide, stirring, standing for 3-4 hours, adding into aeration tank, adjusting pH to 6.5-7.5, and subjecting to aerobic treatment; and flowing effluent into wetland pond planted with flowers and Pennisetum purpureum, performing macroporous resin adsorption, and discharging.