Postoperative pulmonary complications (PPCs) seriously affect the postoperative prognosis of elderly patients underwent hip fracture surgery. Although methylprednisolone is increasingly used, the association between perioperative methylprednisolone and PPCs is still controversial. The study aims to determine whether perioperative administration of methylprednisolone is associated with PPCs in elderlypatients during hip fracture surgery. In this retrospective cohort study, records of 584 patients (≥ 65years) who underwent hip fracture surgery between January 2013 and October 2020 were extracted. Univariate and multivariate regression analysis were performed to identify the risk factors for PPCs. To further explore the association between administration of methylprednisolone and PPCs, 53 patients received methylprednisolone and 53 patients without methylprednisolone were matched for the confounding factors using propensity score matching (PSM) analysis. The odds ratios (OR) and 95% confidence intervals (CI) for the above variables were analyzed. The incidence of PPCs during postoperative hospitalization was 6.83% (38/556) among the elderly patients following hip fracture surgery. Patients with PPCs had higher postoperative mortality rate, longer hospital stay, more hospitalization cost, and higher incidence of cardiac arrest (all P < 0.05). Multivariate logistic regression analysis showed that age, hypertension, hypoglycemia, hypoproteinemia and perioperative methylprednisolone were independent risk factors for PPCs. Moreover, administration of methylprednisolone was significantly correlated with PPCs both before PSM adjustment (OR = 3.25; 95% CI, 1.67 to 6.33; P = 0.001) and after PSM adjustment (OR = 6.68; 95% CI, 1.40 to 31.82; P = 0.017). Perioperative administration of methylprednisolone is a risk factor for PPCs in elderly patients undergoing hip fracture surgery.