A pharmaceutical composition for treating porcine eperythrozoonosis, an injection and a preparation method thereof. The pharmaceutical composition comprises imidazuron hydrochloride, doxycycline hydrochloride, non-steroidal anti-inflammatory drugs, glucocorticoids and salts thereof. The injection consists of the following components by weight percentage: 5-15% of imidazolium hydrochloride, 5-10% of doxycycline hydrochloride, 2-20% of non-steroidal anti-inflammatory drugs, 0.05% of glucocorticoids and their salts ~0.5%, magnesium chloride 0.5~5%, antioxidant 0.1~0.2%, metal complexing agent 0.01~0.05%, propylene glycol 5~20%, and the balance is water for injection. The product of the invention is characterized in that the composition of the prescription is reasonable, the physical and chemical properties of the medicine are stable, the dosage is accurate, the onset of action is fast, the maintenance time of the medicine effect is long, the bioavailability is high, the use is safe, and the curative effect is definite.