The invention discloses medicine for treating dairy cow mastitis and a preparation method thereof. The medicine comprises tropic ageratum herbs, semen trichosanthis, heartleaf houttuynia herbs, eretmochelys imbricata, dysosma versipelis, physalis angulata, olgaea leucophylla, botrypus virginianus, hemistepta lyrata, prunella vulgaris, caulis trachelospermi, sri lanka pouzolzia herbs, cynanchum amplexicaule, honeysuckle, fructus forsythiae, spina gleditsiae, dandelion, melandrium apricum, ficus pandurata, clematis finetiana, semen vaccariae, uniflower swisscentaury roots, beautiful sweetgum fruits, aquama manis, astragalus, angelica sinensis and radix glycyrrhizae. The medicine has the advantages that the effects of clearing heat, removing toxicity, expelling carbuncle, eliminating swelling, promoting blood circulation and removing stasis are achieved, the treatment effect on the dairy cow mastitis is good, the disease-resistant capacity of diary cows can be improved, the immunity of the diary cows can be enhanced, the manufacturing technology is simple and convenient, toxic and side effects are few, medicine administration is convenient, the medicine can directly reach the lesion, the treatment period is short, the dairy cow mastitis is not prone to relapsing after being cured, preparation is easy, and the cost is low.