NOVELTY - Ecological pig farming involves grinding corn, adding warm water, soaking, fermenting, crushing lees, rice bran, wheat bran and soybean meal, mechanical or manual mixing to obtain lees feed, installing greenhouse farming equipment, managing environmental conditions including temperature, humidity, disinfection, feeding time, cleanliness, mental state, feed consumption, treatment of diseases and other factors affecting pig, deworming, defining slaughter time and placing excess manure into digester to produce biogas as fuel and biogas residue for fish, chickens, ducks, geese and other animals.    USE - Method for ecological pig farming (claimed).    ADVANTAGE - The method is environment-friendly.    DETAILED DESCRIPTION - Ecological pig farming comprises grinding 100 kg corn, adding 50 g warm water at 25-35 degrees C, soaking for 1 day, adding 0.25-0.3 kg koji, fermenting at 30-40 degrees C for 10-15 days, carrying out distillation at 100 degrees C for 2-3 hours to obtain wine, crushing 150 kg lees, 10 kg rice bran, 10 kg wheat bran and 2.5 kg soybean meal, mechanical or manual mixing to obtain lees feed, separating pig manure with maggot using 50-80 mesh plastic screenhouse with length of 10-60 m, width of 5-30 m and length of 2-3 m at 25-36 degrees C, mixing 1000 kg pig manure and 10 kg grains, mechanically grinding into particle diameter of 0.1-0.2 mm, adding 2.5 kg sugar and 70-75% water, mechanically mixing to obtain soil testing solution, fermenting for 7 days, adding soil testing solution into the soil, fermenting, constructing pool with length of 1000-2000 mm, width of 800-1000 mm and height of 150-250 mm using wood or cement brick, allowing maggots to reproduce at density of 500-1000 maggots/screenhouse for 7 days where 1000 kg pig manure can produce 150-200 kg live maggots, installing greenhouse farming equipment with length of 50-100 m, width of 10-30 m and height of 2.5-4 m, constructing pig home with length of 3.75-14.25 m, width of 2.5-3.0 m and height of 0.8-1.0 m, providing with feed trough, automatic water pipes and waste outlet, preparing maggot feed with protein content of 62.52% by mixing 0.5 kg maggot, 10 kg wheat bran, 150 kg lees, 10 kg rice bran and 2.5 kg soybean meal, feeding pig considering dietary crude fiber content to prevent diarrhea or constipation, managing environmental conditions including temperature, humidity, ventilation, light, disinfection, feeding time, cleanliness, mental state, feed consumption, treatment of diseases and other factors affecting pig, deworming using albendazole, levamisole or trichlorfon once every 60-90 days, applying immunomodulators and fattening growth-promoting green products to promote lean growth, improve the shape, daily gain and feed conversion rate of pig, defining of slaughter time by inspecting body structure, food consumption and texture of fecal material and placing excess manure into digester to produce biogas as fuel and biogas residue for fish, chickens, ducks, geese and other animals.