The association between exposure to ambient fine particulate matter with an aerodynamic diameter of ≤ 2.5 μm (PM2.5) and short- and medium-term lung function recovery (LFR) in patients undergoing lobectomy remains uncertain. This study investigated the associations between PM2.5 concentrations and LFR in adult patients (n = 526) who underwent video-assisted thoracoscopic (VATS) lobectomy in Guangzhou, China between January 2018 and June 2021. All patients underwent at least two spirometry tests. Environmental PM2.5 concentrations in the same period were collected from the nearest monitoring station. A multiple linear regression (MLR) model was employed to investigate the associations between changes in PM2.5 concentrations and LFR in patients who underwent lobectomy after adjusting for potential confounders. We assessed short- and medium-term LFR in patients who underwent lobectomy. The three- and 6-month average PM2.5 concentrations in each patient's residential area were divided into regional mild pollution (PM2.5 <25 μg/m3), moderate pollution (25 μg/m3 ≤ PM2.5 <35 μg/m3), and severe pollution (35 μg/m3 ≤ PM2.5) periods. The MLR model confirmed that PM2.5 was an independent risk factor affecting short-term forced lung capacity (FVC), forced expiratory volume in 1 s (FEV1), and maximum expiratory flow at 50% vital capacity (MEF50) recovery (adjusted P = 0.041, 0.014, 0.016, respectively). The MLR model confirmed that PM2.5 was an independent risk factor affecting medium-term MEF50 recovery (adjusted P = 0.046). Compared with the moderate and severe pollution periods, the short- and medium-term LFR (FVC, FEV1, MEF50) of patients in the mild pollution period were faster and better (P < 0.001, P < 0.001, P < 0.001, P = 0.048, P = 0.010, P = 0.013, respectively). Thus, exposure to high PM2.5 levels was associated with significantly reduced speed and degree of short- and medium-term LFR in patients who underwent lobectomy.