The invention relates to a drug for prevention and treatment of transmissible gastroenteritis of swine and epidemic diarrhea. The drug comprises the following components according to weight ratio: 10000 of rice powder, 25 of ligusticum wallichii, 30 of costus root, 35 of cortex cinnamomi, 25 of radix angelicae, 30 of fructus gleditsiae, 35 of Chinese wild ginger, 30 of ephedra, 25 of aconite root, 30 of radix scrophulariae, 30 of golden cypress, 25 of radix aconite, 30 of sophora flavescens, 30 of distiller yeast, 30 of cortex moutan, 30 of angelica sinensis, 50 of ginkgo leaves, 100 of pear tree bark and 3000 of white sand mud. The drug is prepared by pure Chinese herbal medicine, can effectively kill virus triggering porcine epizootic diarrhea and transmissible gastroenteritis of swine, and has the advantages of being environment-friendly in formula, simple and reasonable in technology, low in manufacture cost, good in prevention and treatment effect, and small in side effect.