Background Previous studies have reported that metabolic syndrome is associated with depression. In recent years, the ratio of uric acid to high-density lipoprotein cholesterol (UHR) has been considered as a new effective marker of metabolic syndrome. The purpose of this study was to investigate the association between UHR and depression in people aged 45 years and older in China using the China Health and Retirement Longitudinal Study(CHARLS) database. Methods A total of 10,396 subjects aged 45 years and above were included in this cross-sectional study. The Center for Epidemiologic Studies Depression Scale (CESD-10) was used to facilitate rapid screening and assessment of depression. A CESD-10 score of ≥ 10 was considered the critical value of depression. UHR was calculated from the ratio of serum uric acid (mg/dL) to high-density lipoprotein cholesterol (mg/dL). Linear regression and logistic regression were used to explore the relationship between UHR and depression, respectively. In addition, subgroup analysis and interaction tests were performed. Results The study found that UHR was negatively associated with depression. In the fully adjusted model, every 1-unit increase in UHR was associated with a 14% lower odds of developing depression (OR = 0.14, 95% CI: 0.05-0.37). Participants in the highest quartile of UHR were 24% less likely to develop depression compared with participants in the lowest quartile (OR = 0.76, 95% CI: 0.67–0.87). The interaction analysis indicates that this negative correlation is more pronounced in the subgroup aged 60 years and above. Conclusion UHR was significantly negatively correlated with depressive symptoms in the middle-aged and elderly Chinese population. However, further prospective studies are needed to accurately elucidate the causal relationship between increased UHR levels and the risk of depression. Therefore, larger cohort studies are needed to support these findings.