Studies on the effects of high-density lipoprotein cholesterol (HDL-C) on gastric cancer mortality are few, and the results are inconsistent. In this study, we investigated the effects of HDL-C on gastric cancer mortality and conducted sub-group analysis by sex and treatment modality. Newly diagnosed patients with gastric cancer (n = 22,468) who underwent gastric cancer screening between January 2011 and December 2013 were included and followed up until 2018. A validation cohort (n = 3379) that had newly diagnosed gastric cancer from 2005 to 2013 at a university hospital, was followed up until 2017. HDL-C was inversely related with mortality; adjusted hazard ratio (aHR) 0.90 (95% confidence interval [CI], 0.83–0.98) for HDL-C of 40–49 mg/dL, 0.86 (0.79–0.93) for HDL-C of 50–59 mg/dL, 0.82 (0.74–0.90) for HDL-C of 60–69 mg/dL, and 0.78 (0.69–0.87) for HDL-C ≥ 70 mg/dL compared to HDL-C < 40 mg/dL. In the validation cohort, HDL-C was also inversely associated with mortality; aHR 0.81 (0.65–0.99) for HDL-C of 40–49 mg/dL, 0.64 (0.50–0.82) for HDL-C of 50–59 mg/dL, and 0.46 (0.34–0.62) for HDL-C ≥ 60 mg/dL compared to HDL-C < 40 mg/dL. The two cohorts demonstrated that higher HDL-C was associated with a low risk of mortality in both sexes. In validation cohort, this association was observed in both gastrectomy and endoscopic resection (p for trend < 0.001) as more remarkable in endoscopic resection group. In this study, we explored that an increased HDL-C reduced mortality in both sexes and curative resection group.