We employed Cox proportional hazards models, including restricted cubic splines to explore non-linear relationships, two-piecewise regression for identifying population-specific thresholds, and mediation analysis to quantify BMI's mediating effect on the AST/ALT-diabetes risk association.<h4>Results</h4>In a cohort of 99,572 participants with 1,403 new diabetes cases, AST/ALT showed a significant negative association with diabetes risk across Chinese and Japanese populations (HR per unit increase: Chinese: 0.417, 95% CI: 0.341-0.510; Japanese: 0.631, 95% CI: 0.416-0.956). This evidence concerns the gene GPT and diabetes mellitus.