A large-scale pig farm with 50000 heads in stock, using the water soaked manure process, produces approximately 600 tons of wastewater per day. The COD concentration in the wastewater is as high as 12000mg/L, ammonia nitrogen exceeds 900mg/L, total phosphorus reaches 150mg/L, and contains a large amount of suspended solids, pathogens, and residual antibiotics. The original “solid-liquid separation+traditional anaerobic+aerobic” process cannot stably meet the standards, and the surrounding farmland has limited absorption capacity. The overflow of biogas slurry has caused black and odorous ditches, and has been punished by environmental protection departments multiple times. After the renovation, a combination process of “solid-liquid separation+black film biogas digester (retention time of 30 days)+two-stage A/O (anoxic/aerobic)+deep phosphorus removal (chemical precipitation)+ozone disinfection+ecological oxidation pond” will be adopted, and a biogas purification power generation and biogas slurry pipeline return system will be provided. After implementation, the COD removal rate was 98.5%, ammonia nitrogen was reduced to below 40mg/L, total phosphorus was below 5mg/L, and the effluent met the “Irrigation Water Quality Standards for Farmland”. All of it was used for fertilization and irrigation in the surrounding 3000 acre planting base; Biogas generates 12000 kilowatt hours of electricity per day, meeting 50% of the electricity demand in the site; Thoroughly achieving zero discharge of wastewater, saving about 3 million yuan in annual sewage and electricity fees, and resolving environmental disputes with surrounding villagers.