The invention discloses an organic fertilizer and a preparation method thereof, belongs to the technical field of soil fertilizers and soil improvement, and aims to solve the problems of reduction of soil nutrients, reduction of fertility, reduction of soil organic matter, deterioration of soil physical properties and weakening of disaster resistance of black soil in the prior art. The invention relates to the organic fertilizer. The organic fertilizer is prepared from the following main components in parts by weight: 1-6 parts of diatomite; 40-60 parts of livestock and poultry manure; 20-40 parts of pine cone peel and / or hazelnut peel; 8-15 parts of protein residue; 7-10 parts of coal slime; and 0.3-0.5 part of a complex microbial inoculant. The preparation method of the organic fertilizer comprises the following steps: preparing a complex microbial inoculant, and crushing the pine cone peel and the hazelnut peel into fragments; uniformly mixing the complex microbial inoculants and the fragments with diatomite, livestock and poultry manure, protein residues and coal slime, and adjusting the water content to obtain a mixture; fermenting and decomposing the mixture, and conducting turning to dissipate heat if the temperature of the mixture reaches 65 DEG C; and if the color of the mixture becomes brown or black brown and no stink exists, indicating that fermentation is completed, so as to obtain the organic fertilizer.