Background The association between serum uric acid (SUA) and dyslipidaemia is still unclear in patients with type 2 diabetes mellitus (T2DM). This study aimed to examine the association between SUA and dyslipidaemia and to explore whether there is an optimal SUA level corresponding to the lower risk of suffering from dyslipidaemia.Research design and methods This cross-sectional study included 1036 inpatients with T2DM and the clinical data were extracted from the hospital medical records. Multivariate logistic regression analysis was performed to assess the association between hyperuricaemia and dyslipidaemia. Restricted cubic splines (RCS) analysis was performed to determine the optimal SUA level for the lower risk of dyslipidaemia.Results After adjustment for the potential confounders, hyperuricaemia was significantly associated with dyslipidaemia (OR=3.72, 95% CI: 2.28, 6.07) and hypertriglyceridaemia (OR=2.63, 95% CI: 1.68, 4.12). Notably, mediation analysis revealed a significant mediating effect of SUA in this relationship (indirect effect=0.08, p<0.001), elucidating 20.1% of the total relationship.Conclusions Hyperuricaemia was positively associated with dyslipidaemia and hypertriglyceridaemia. SUA mediated the effect of insulin resistance on triglyceride metabolism in patients with T2DM. A potential benefit of stricter control of SUA levels among patients with T2DM is possibly reducing the risk of dyslipidaemia.