After fully adjusting for confounding factors, we found a significant positive association between the ALT/HDL-C ratio and the risk of diabetes [Hazard ratios 1.06, 95% confidence intervals: 1.05, 1.06], and this association was significantly higher in males, obese individuals [body mass index ≥ 28 kg/m2] and individuals aged < 60 years (All P interaction < 0.05). This evidence concerns the gene GPT and diabetes mellitus.