The invention provides a coprophilous fungus composition. According to the invention, fresh night soil of adult health pig is taken as a manure source, a coprophilous fungus final suspension is prepared by three-time centrifugation under specific low-temperature condition, a high molecular weight compound protective agent skimmed milk powder and a low molecular weight compound protective agent (glycerin, lactose, galactose, cane sugar, glucose, maltodextrin, sorbitol, adonitol and trehalose) are added, the coprophilous fungus composition is produced, which contains abundant Bacillus spp, lactic acid bacteria, lactobacillus, bifidobacteria, and streptococcus thermophilus, live bacteria number is kept at 108 CFU/g and more, the coprophilous fungus composition is used for preventing and treating diarrhoea of pigling at a lactation period, the prevention and treatment effects are obvious, the coprophilous fungus composition has more obvious effect for preventing and treating diarrhoea of pigling with 0-14 days (21-28 days early-stage weaning method) and 0-21 days (35 days weaning method). The preparation method of the coprophilous fungus composition is simple, the product shelf-life is long, the defect that the current coprophilous fungus transplant requires real-time preparation in the prior art, and the coprophilous fungus composition is suitable for industrial production.