Alpha-1-acid glycoprotein (AGP) is regarded as an inflammatory factor. Currently, the relationship between serum AGP levels and depression is controversial. We designed a cross-sectional study to explore the association between serum AGP levels and depression using data from the National Health and Nutrition Examination Survey (NHANES) from 2021 to 2023. The PHQ-9 questionnaire was used to investigate the depression symptoms of participants, and the PHQ-9 score ≥ 10 was regarded as depression. Weighted multivariate logistic regression models, weighted multiple linear models, restricted cubic splines models (RCS), subgroup analyses, and interaction tests were performed to explore the association of serum AGP levels with depression. ROC curves were used to plot the predictive effect of AGP on depression. The mediation analysis was conducted to assess the mediation effect of the TyG index. Our study revealed that serum AGP levels were positively and linearly associated with depression. In the fully adjusted model, the odds ratio of depression elevated by 1.04 times (OR = 2.04, 95 % CI: 1.17-3.57), and the PHQ-9 score increased by 1.47 (β = 1.47, 95 % CI: 0.37-2.56) for each ln-unit AGP level increase, respectively. A positive relationship was also observed in some subgroups. Furthermore, AGP presented a strong predictive effect on depression. In addition, the TyG index had a significant mediation effect on the relationship between serum AGP levels and depression. In general, our study provides some new insight into the role of AGP on depression and the mediation effect of the TyG index.