The invention discloses an organic-inorganic environmentally-friendly pollution-free compound fertilizer and a preparation method thereof. The compound fertilizer comprises the following components, in percentages by mass: 20-25% of harmless livestock and poultry manure, 5-10% of earthworm excreta, 10-15% of humic acid, 25-30% of urea, 14-24% of monoammonium phosphate, 8-18% of potassium chloride,and 5-8% of calcium dihydrogenphoshate. The preparation method comprises the following steps: removing heavy metals in the livestock and poultry manure, performing harmless treatment on heavy metal ions through earthworms and preparing the high-quality organic fertilizer raw material earthworm excreta, removing antibiotics of the livestock and poultry manure by adopting physical, chemical and biological methods, wherein the above steps solve the problems that the heavy metals and the antibiotics pollute the environment and endanger human health, and performing composting fermentation, whereina secondary granulation technology is adopted to improve a granulation rate of the material, clay for promoting granulation does not need to be added, a large amount of liquid vapor or water does notneed to be supplemented, so that the problem of difficulty in granulation of an organic-inorganic fertilizer is solved. The prepared product provided by the invention has the following advantages: 1,the product has a high nutrient content, a low moisture content, good particle strength and low costs; and 2, organic matter sources of the product are the livestock and poultry manure, the earthwormexcreta and the humic acid, compared with other organic-inorganic fertilizers, the fertilizer provided by the invention has diversified and pollution-free organic matter sources, facilitates being absorbed and utilized by crops.