Based on data from GLGC2021, we found that HMGCR inhibitors (1OR, 0.719 per SD reduction in LDL-C; 95% CI, 0.540–0.958; P = 0.024), HMGCR-correct inhibitors (1OR, 0.675 per SD reduction in LDL-C; 95% CI, 0.462–0.986; P = 0.042), LDL-C proxied CETP inhibitors (1OR, 0.325 per SD reduction in LDL-C; 95% CI, 0.171–0.618; P = 0.001), and HDL-C proxied CETP inhibitors (OR, 0.796 per SD increase in HDL-C; 95% CI, 0.643–0.986; P = 0.037) had a protective effect on total sepsis. The gene discussed is HMGCR; the disease is Sepsis.