The appreciation of sex differences is substantial for precise cancer management. Surgery is the main treatment for non-small cell lung cancer (NSCLC). We aimed to identify sex differences on perioperative outcomes in NSCLC patients and to uncover the origins of sex effect in outcomes using a Chinese cohort. We retrospectively enrolled patients undergoing NSCLC surgery in the Western China Lung Cancer Database from January 2014 to April 2021. We compared baseline characteristics and perioperative outcomes between male and female. Multivariable analyses were performed. We conducted causal mediation analysis to identify drivers to sex differences in perioperative outcomes. Altogether, data of 10,181 patients (5,738 women and 4,443 men) were analyzed. Women had lower incidence of complications (5.05% vs. 12.15%), shorter postoperative length of stays (4.92 vs. 6.41 days), and less hospitalization cost (50,713.69 vs. 54,580.85, Chinese Yuan). Multivariable regression analysis identified sex as an independent factor of perioperative complications [odds ratio (OR), 1.843, 95% confidence interval (CI): 1.476-2.294], as well as of postoperative length of hospital stays (beta 0.123, 95% CI: 0.099-0.148), and hospitalization cost (beta 0.026, 95% CI: 0.026-0.026). Mediation analysis revealed that age, body mass index, prevalence of chronic obstructive pulmonary disease, predicted diffusion capacity for carbon monoxide, tumor size, pleural adhesion, and surgery duration were identified as mediators for sex differences in outcomes, while smoking status, surgery type, and resection extent were not. Female NSCLC patients demonstrated lower incidence of complications, shorter postoperative length of stays, and less hospitalization cost after surgery. Those differences between men and women could be explained by their inherent biological differences and baseline health status. Perioperative management strategies for NSCLC should prioritize recognizing the potentially poorer outcomes among male patients and implementing tailored precautions accordingly.