To evaluate the effect and cost of Xiyanping injection (herb-derived compound, andrographolide sulfonate) on the treatment of community acquired pneumonia among adults using real world data in China. Data about patients diagnosed with community acquired pneumonia identified with ICD-10 diagnosis code dated between 2013 and 2014 was extracted from the Hospital Information System Database of 2 hospitals in Jiangxi Province. Patients were divided into 4 groups according to the age and causative agent: young patients (15-64 years) with viral pneumonia (group 1) or bacterial pneumonia (group 2), and elderly patients (over 65 years) with viral pneumonia (group 3) or bacterial pneumonia (group 4). Cure rate, improvement rate, uncured rate, death rate, average hospitalization days and total hospitalization costs were compared between patients treated with Xiyanping injection and those treated with conventional treatment. 114 patients treated with Xiyanping injection (60, 21, 18 and 15 patients in group 1-4, respectively) and 3,107 patients with conventional treatment (893, 376, 1,322 and 516 patients in group 1-4, respectively) were included. After prosperity score matching, no significant differences in the cure rate, improvement rate, uncured rate, and death rate when comparing patients treated with Xiyanping injection and those treated with conventional treatment. Patients treated with Xiyanping injection had significantly shorter hospital stay for Group 1 patients (5.142±2.54 vs. 6.98±3.86 days), Group 2 patients (5.00±2.61 vs. 7.92±3.75 days) and Group 4 patients (5.58±2.97 vs. 9.25±3.19 days). The total cost of hospitalization was lower for patients treated with Xiyanping injection than those treated with conventional treatment in Group 1, 2 and 4 although there were no significant statistics differences. Comparing with conventional treatment, Xiyanping injection provided the same clinical outcome but with shorter hospital stay resulting in reduced hospitalization cost for adults with community acquired pneumonia in China.