Primary spontaneous pneumothorax (PSP) is a common benign disorder. However, unpredictable recurrence is a major concern for most patients. The aim of the present study was to assess the role of matrix metalloproteinase-2 (MMP-2) and MMP-9 in alveolar macrophages of patients with PSP and its relationship with recurrence. Ninety-two patients who received needlescopic video-assisted thoracoscopic surgery (NVATS) wedge resection of lung with identifiable blebs for PSP were enrolled for the study. Immunohistochemistry was performed to evaluate the expression of MMP-2 and MMP-9 in lung tissues of patients with PSP. The result was correlated with clinicopathological variables and recurrence rates by the chi-square test. The value of MMP-2 and MMP-9 for overall recurrence was evaluated by univariate and multivariable Cox regression analyses. The MMP-2 and MMP-9 staining was predominantly observed in alveolar macrophages of patients with PSP. We found that MMP-2 (recurrence: P<0.001; smoking status: P=0.029) and MMP-9 (recurrence: P=0.001; smoking status: P=0.045) expression in PSP, especially male patients, was significantly correlated with recurrence and smoking status. In the multivariate analyses, MMP-2 [hazard ratio (HR) =2.83; 95% confidence interval (CI): 1.37-5.85, P=0.005) and MMP-9 (HR =2.25; 95% CI: 1.19-4.24, P=0.013) were statistically significant risk factors for overall recurrence in PSP patients. High expression levels of MMP-2 and MMP-9 showed a positive correlation with recurrence in PSP patients. Further studies are required to test whether inhibition of MMP-2 and MMP-9 expression renders a promising approach for reducing the risk of PSP recurrence in the future.