The invention discloses a medicine for treating viral pneumonia and a preparation method thereof and belongs to the field of traditional Chinese medicines. The effective components of the medicine comprise the following raw materials: lily, fructus psoraleae, jellyfish, cajeput, rosa bracteata, platycodon grandiflorum, Chinese pulsatilla root, justicia procumbens, kumquat, semen cassiae, broadleaf holly leaf, white strawberry, eucalyptus globulus, rhizoma bletillae, wikstroemia indica and reed stems. The medicinal materials adopted by the medicine are compatible, and the medicine conforms to the theory of traditional Chinese medicine and modern medicine, has the effects of clearing away heat and toxic materials, antisepsis and anti-inflammation, clearing diarrhea damp-heat, reducing phlegm and stopping coughing, and has significant curative effects on treating symptoms such as hyperpyrexia, slight aversion to chilliness, headache, bodily pain, cough and yellow sputum caused by viral pneumonia. The medicine has the advantages of short course of treatment, fast effectiveness, high safety and reliability, no toxic or side effects and no recurrence after curing, and the total effective rate of treating viral pneumonia is 97.8 percent.