Although the risk of depression is well-known in the patients with kidney dysfunction, especially at the late stages, little is known about the exact point at which the decline in estimated glomerular filtration rate (eGFR) begins to significantly increase the risk of depression. In the present study, we analysed a nationwide epidemiological dataset to investigate the dose-dependent association between baseline eGFR and a future risk of developing depression in a general population. We retrospectively analysed 1,518,885 individuals (male: 46.3%) without a history of depression identified between April 2014 and November 2022 within a nationwide epidemiological database, provided by DeSC Healthcare (Tokyo, Japan). We investigated the association of eGFR with the incidence of depression using Cox regression analyses and also conducted cubic spline analysis to investigate the dose-dependent association between eGFR and depression. In the mean follow-up of 1218 ± 693 days, 45,878 cases (3.0% for total participants, 2.6% for men and 3.3% for women) of depression were recorded. The risk of depression increased with the eGFR decline as well as the presence of proteinuria. Multivariable Cox regression analysis showed the hazard ratio (95% CI) of depression in each kidney function category (eGFR ≥90, 60-89, 45-59, 30-44, 15-29, and < 15 mL/min/1.73 m2) was 1.14 (1.11-1.17), 1 (reference), 1.11 (1.08-1.14), 1.51 (1.43-1.59), 1.77 (1.57-1.99) and 1.77 (1.26-2.50), respectively. In the cubic spline analysis, the risk of depression continued to increase monotonically as the eGFR declined when the eGFR fell below approximately 65 mL/min/1.73 m2. Our analysis using a large-scale epidemiological dataset presented the dose-dependent association between eGFR decline and the risk of depression, which highlights the importance of incorporating mental health assessments into the routine care of patients with kidney dysfunction, regardless of the stage of their disease.