The invention discloses a method for improving soil fertility of a greenhouse and preventing a soil disease. The method comprises a biogas slurry storage step, a soil anaerobic fermentation raw material sowing step, a step of conducting soil tillage on evenly-scattered anaerobic fermentation raw materials, a step of conducting flood irrigation on a cultivated filed through the biogas slurry and water, a step of covering a mulching film for sealing, a step of depressing the greenhouse, and a step of uncovering the mulching film to again conduct soil tillage. The method has no chemical composition residuals, can not damage strain balance of various beneficial bacteria in the soil, does not enable the beneficial bacteria to produce drug resistance, is stable in disinfection effect, can play a role of disinfecting on a deeper soil layer, is low in disinfection cost, can be used in a certain area in large-quantity and high-strength modes, solves the problem that biogas slurry consumption in a biogas project is difficult, improves soil physical and chemical properties and acid-base equilibrium, improves disease-insect resistance of the crop and stress resistance of a bad condition, can kill harmful bacteria, reduces the disease, improves absorption efficiency of the crop on various fertilizer components, improves fertilizer efficiency of the fertilizer and saves fertilizing cost.