The invention discloses a method for preparing an organic fertilizer for planting tomatoes. The method comprises the following steps: (1) powdering, namely drying organic raw materials till the water content is 10-14%, performing powdering treatment for 2-3 times repeatedly by using a powder machine, and performing high-temperature sterilization treatment; (2) performing ammoniation treatment, namely performing ammoniation treatment under a pressure condition of 0.3-0.4MPa; (3) performing magnetic fermentation, namely putting a mineral solution into a fermentation tank, and performing magnetic fermentation under conditions of vacuum degrees of 80%, 85% and 100% respectively; (4) performing enzymolysis, namely putting water into organic fermentation materials, adding mixed enzymes, and performing enzymolysis; (5) performing secondary fermentation, namely putting the mineral solution into the enzymolysis organic materials, adding fertilizer fermentation agents, and performing composting fermentation. Compared with a control group, the organic fertilizer prepared by using the method is capable of increasing the content of vitamin A in tomatoes by 32.6ug / 100g, increasing the ash content by 1.53%, and reducing the insect and disease rate by 1.79%.