Ethylene oxide (EO) is an organic compound known for its high reactivity and negative impact on human health, but its adverse effects on depression remain poorly understood. A cross-sectional study was conducted among 2884 participants from the National Health and Nutrition Examination Survey (NHANES) between 2013 and 2016. Participants were classified into four groups according to quartiles of log10-transformed hemoglobin adducts of EO (HbEO) levels. A logistic regression model was used to estimate the association between EO exposure and the risk of depression. Finally, we evaluated whether the association was mediated by inflammatory factors. Individuals with depression exhibited higher levels of hemoglobin adducts of ethylene oxide (HbEO) compared to those without depression. After adjusting for all covariates, patients in the highest quartile of HbEO (Q4 group) had a higher risk of depression, using the lowest quartile (Q1 group) as the reference group [odds ratio (OR) = 2.21, 95% confidence interval (95% CI): (1.47, 3.40)]. Additionally, the relationship between EO levels and the prevalence of depression followed a non-linear U-shaped pattern. Furthermore, inflammatory cells showed a positive correlation with EO levels. Moreover, white blood cells and neutrophils significantly mediated the relationship between HbEO and the risk of depression with mediated proportions of 14.70 and 12.55%, respectively. Exposure to ethylene oxide increases the risk of depression. Inflammatory factors partially mediated the observed association between EO exposure and depression.