Clean water and sanitation provisions are essential for good hygiene and health, with rural South Africa facing a simultaneous access crisis of both, the direct health effect of restricted access to both on mental health remaining scarce and largely overlooked. This study investigated the association between access to clean water and sanitation on depression in rural South Africa utilizing the most recent data (year 2017) from the South African National Income Dynamics Study. Our study outcome was depression, based on the 10-item abridged version of the Center for Epidemiologic Studies Depression Scale (data available in SA-NIDS), the main exposures being access to clean water and adequate sanitation facilities (i.e. flushing toilets). Two types of analyses were conducted: first, adjusted logistic regression models were fitted to assess the relationship between lack of access to clean water and adequate sanitation to depression. Second, we conducted mediation analysis to investigate whether access to clean water mediated the relationship between lack of access to toilets and depression. A high proportion of rural participants lacked access to clean water (n?=?6,188, 47.6\%) and adequate toilets (n?=?9,797, 81.6\%). The regression analyses indicated that lack of access to both clean water (OR?=?1.21, 95\% CI: 1.06–1.39) and adequate sanitation (OR?=?1.36, 95\% CI: 1.10–1.69) were significantly associated with greater odds of depression. The mediation analysis indicated that access to clean water partially mediated the relationship between lack of access to adequate sanitation and depression, the total mediated effect being 18.2\% (95\% CI: 11.0\%–51.0\%). Most rural communities in South Africa lack access to basic services that are essential for human dignity and a decent quality of life, leading to opportunities for poor mental health, with its various consequences for socio-economic development and personal wellbeing, including avoidable depression.