The invention discloses a static-pile composting method for treating cow dung harmlessly. The method comprises the three steps that S1, a microbial inoculant is prepared, in specific, four kinds of microorganisms including ABTNL-2 bacillus subtilis, bacillus licheniformis, bacillus cereus and lactobacillus are utilized to prepare the microbial complex inoculant for cow dung composting; S2, cow dung composting is built, in specific, the microbial inoculant is inoculated to the mixture after the cow dung and plant materials are mixed, composting is built up after the materials are mixed evenly,a ventilation and temperature monitoring device is arranged in the compost, and the surrounding part of the pile body is completely covered with stack to preserve the heat; and S3, compost managementis conducted, in specific, air is injected into the pile body so as to ensure rapid warming and decomposition of the compost, the pile body temperature is monitored, the product after composting serves as biological organic fertilizer. The method can achieve rapid, simple and convenient harmless treatment of cow dung of small-scale farmers, and particularly can rapidly and completely inactivate the enterohemorrhagic escherichia coli O157:H7 in the cow dung, and the composting product can serve as the biological organic fertilizer to achieve resource utilization.