Objective To observe the effects of Yupingfeng combined with transfer factor oral liquid on immune function and inflammatory factors in children with mycoplasma pneumonia. Methods A total of 82 children with mycoplasma pneumonia diagnosed and treated in our hospital from January 2018 to January 2019 were selected as research objects and randomly assigned to the control group and the experimental group. There were 42 cases in the control group (19 males and 23 females) and 42 cases in the experimental group (22 males and 20 females). After conventional treatment, the control group was added with transfer factor oral solution, and the experimental group was combined with Yupingfeng oral solution on the basis of adding transfer factor oral solution. The immune status, inflammatory factors and clinical efficacy of the two groups were compared. Results According to the study results, the total effective rate of the control group was 73.81%, while the total effective rate of the experimental group was 92.86%. The proportion of ineffective patients in the control group was as high as 26.19%, while the proportion of ineffective patients in the experimental group was only 7.14%. In conclusion, the treatment effect of the experimental group was significantly higher than that of the control group, and the difference between the two groups was statistically significant (P<0.05). When comparing the immune status of patients, it was found that after treatment, the values of the two groups were decreased, and there were significant differences. When observing the values of immune protein spheres G (lgG), immune protein spheres A (lgA) and immune protein spheres M (lgM), the values of the control group were slightly higher, the difference was statistically significant (P<0.05). When observing the changes of inflammatory factors in the two groups of patients, it was found that the values of the two groups of patients were changed after treatment, and there was a significant decline in the values of interleukin-2 (IL-2), interleukin-18 (IL-18) and interleukin-13 (IL-13), and the values of the experimental group were significantly lower than those of the control group. The difference was statistically significant (P<0.05). Conclusion Yupingfeng combined with transfer factor oral solution has positive effects on immune function and inflammatory factors in children with mycoplasma pneumonia, and can improve the clinical therapeutic effect.