The invention belongs to the technical field of agriculture and in particular relates to an organic fertilizer which is prepared from the following raw materials in parts by weight: 200-620 parts of oil cakes, 100-380 parts of sugar residues, 50-140 parts of sheep manure, 80-230 parts of cow dung, 60-190 parts of corn straw, 30-100 parts of rice straw and 10-29 parts of composite bacteria. The preparation method of the organic fertilizer comprises the following steps: crushing the oil cakes, the sugar residues, the sheep manure, the cow dung, the corn straw and the rice straw, uniformly mixingwith the composite bacteria, further uniformly mixing with water, carrying out composting fermentation, further carrying out liquid fermentation with water in a fermentation tank, and filtering, thereby obtaining the organic fertilizer. By adopting the organic fertilizer, the content of organic matters and total nutrients in the organic fertilizer can be increased, and the fertilizer efficiency of the organic fertilizer can be improved.