Chronic postsurgical pain (CPSP) is a significant detriment to postsurgical recovery. Previous studies have shown that nitrous oxide (N2O) may produce long-term analgesia and may benefit the prevention of CPSP in Chinese patients. We tested the hypothesis that N2O is a protective factor against chronic pain after video-assisted thoracoscopic surgery (VATS). Two groups of patients with and without N2O inhalation during VATS in Peking Union Medical College Hospital were recruited. Perioperative information was documented, and postsurgical pain was followed up by telephone. The primary outcome was the presence of CPSP at 6 months postoperatively. Odds ratios (ORs) and their 95% confidence intervals (CIs) were estimated using a multivariate logistic regression model adjusted for relevant confounding factors. A total of 833 patients were eligible, among whom 33.6% were male and 66.4% were female, with an average age of 56.3±11.1 years. A total of 387 (46.5%) patients reported incision-related pain at 6 months after surgery, and 160 (40.0%) out of 400 patients with N2O inhalation during surgery and 227 (52.4%) out of 433 patients without N2O inhalation during surgery developed CPSP. After adjusting for confounding factors, N2O inhalation during surgery was associated with lower odds of CPSP (OR =0.654; 95% CI: 0.480-0.890; P=0.007). N2O inhalation during surgery was associated with lower odds of CPSP in VATS patients, and N2O may benefit the prevention of chronic pain after thoracoscopic surgery.