Objective: This study aimed to investigate the relationship between dry eye disease (DED) with anxiety and depression. Additionally, the mediating effect of sleep quality on this relationship was explored.Methods: 321 patients with DED were recruited from Tianjin Medical University Eye Hospital clinic and surveyed using demographic questionnaires, the Ocular Surface Disease Index (OSDI), Hospital Anxiety and Depression Scale (HADS), and Pittsburgh Sleep Quality Index (PSQI). Regression analysis and the bootstrap method were used to investigate the influence of sleep on the relationship between DED, anxiety and depression.Results: Among the patients with DED, 86 (26.79%), 85 (26.48%), and 54 (16.82%) patients presented with anxiety, depression, and both anxiety and depression respectively. The OSDI and PSQI score were positively correlated with depression and anxiety (all p < 0.01). The direct effects of OSDI on depression and anxiety were significant (P < 0.01). Additionally, the bootstrap test showed significant mediating effects of subjective sleep quality [95% CI [0.003–0.016] (depression); [0.001–0.011] (anxiety)] and sleep latency [95% CI [0.001–0.010] (depression); [0.001–0.008] (anxiety)]. These results indicated that the severity of DED symptoms, as measured by the OSDI score, affected anxiety and depression through a direct and an indirect pathway mediated by subjective sleep quality and sleep latency.Conclusions: The results indicated that there was a significant correlation between DED and anxiety and depression. Moreover, subjective sleep quality and sleep latency were a mediator of the relationship between DED symptoms and anxiety and depression.