Objective To analyze the effect of azithromycin in the treatment of pediatric pneumonia.Methods 120 children with pneumonia were selected as the study subjects,and the above children were randomly divided into a control group and an experimental group,with 60 cases in each group.The control group was treated with erythromycin,and the experimental group was treated with azithromycin.The clinical efficacy,inflammatory factors[tumor necrosis factor-α(TNF-α),C-reactive protein(CRP),interleukin-6(IL-6)],pulmonary function indicators[peak expiratory flow rate(PEF),forced expiratory volume in one second(FEV1),ratio of FEV1 to forced vital capacity(FEV1/FVC)]and incidence of adverse reactions were compared between the two groups.Results The total effective rate of the experimental group was 96.67%,which was higher than the control group's 86.67%(P<0.05).After treatment,the experimental group had TNF-α of(1.31±0.28)ng/ml,CRP of(7.09±1.22)mg/L,and IL-6 of(62.25±5.18)pg/ml,which were lower than(2.26±0.30)ng/ml,(9.24±1.50)mg/L,and(100.85±7.34)pg/ml in the control group(P<0.05).After treatment,the experimental group had PEF of(4.05±0.58)L/s,FEV1 of(3.00±0.82)L,and FEV1/FVC of(80.55±5.38)%,which were higher than(3.56±0.49)L/s,(2.05±0.46)L,and(73.85±4.14)%in the control group(P<0.05).The incidence of adverse reactions in the experimental group was 5.00%,which was lower than the control group's 16.67%(P<0.05).Conclusion The application of azithromycin can effectively alleviate the clinical symptoms of children with pneumonia,improve their lung function,reduce the level of inflammatory factors,and play a very important role in improving the therapeutic effect of children and reducing the incidence of adverse reactions.