The invention provides a formula of organic fertilizer preventing pests and especially discloses the formula of the organic fertilizer preventing the pests. In the technical scheme, the organic fertilizer is composed of following main components: chicken manure, corn stalk, gluconic acid, tartaric acid, an organic phosphorus agent and hydrogen peroxide, wherein the proportion of the chicken manure, the corn stalk, the gluconic acid, the tartaric acid, and the organic phosphorus agent is 5:2:0.8-1:1:0.025 and the amount of the hydrogen peroxide is determined according to the weight. The organic fertilizer is characterized by being capable of killing majority of bacteria and pests and supplying nutrients for plants. The organic phosphorus agent has effects of killing the pests through contact toxicity, stomach toxicity and smoking toxicity, can inhibit effects of Cholinesterase in organisms for blocking nerve conduction to enable excition, spasm and ataxia in pests and death of pests. By means of preparing the organic fertilizer with the materials, not only can damage by pests be prevented effectively but also growth of the plants can be promoted. The organic fertilizer can enable the plants to absorb the nutrients and meanwhile can prevent the plants from being damaged by the pests.