Although the benefits of sodium-glucose cotransporter 2 inhibitor (SGLT2i) use in chronic kidney disease (CKD) are well established, the effects of these therapeutic agents in patients with advanced CKD are less certain. We hypothesised that the continued use of these drugs, even when renal function deteriorates to stage 4 CKD or worse, is safe and associated with improved cardiorenal survival. This is a retrospective cohort study utilising data from medical records from two institutions. All patients with type 2 diabetes mellitus who were prescribed an SGLT2i between 1 January 2016 and 31 December 2021, who subsequently had eGFR <30 ml/min per 1.73 m2 recorded on two occasions at least 90 days apart, were identified. The date on which the eGFR first reached any level less than 30 ml/min per 1.73 m2 was defined as the index date. Individuals were then categorised into the SGLT2i continuation group or the discontinuation group according to the use of SGLT2i after the index date. Inverse probability of treatment weighting (IPTW) was performed to minimise confounding. Outcomes of interest included heart failure outcomes, cardiovascular outcomes, renal outcomes and safety outcomes. According to the eligibility criteria, 337 patients in the continuation group and 358 in the discontinuation group were identified. After IPTW, continuation of SGLT2i use was associated with significantly lower risks of the composite of major adverse cardiovascular events compared with discontinuation of SGLT2i use (HR 0.65 [95% CI 0.43, 0.99]), largely driven by reduced risk of myocardial infarction during follow-up (subdistribution HR [SHR] 0.43 [95% CI 0.21, 0.89]). The incidences of an eGFR decline of 50% or more (SHR 0.58 [95% CI 0.42, 0.81]) and all-cause hospital admission (SHR 0.77 [95% CI 0.64, 0.94]) were also significantly lower in the continuation group. None of the studied safety outcomes were significantly different when comparing the two groups. Blood haemoglobin levels were significantly higher in the continuation group at the end of follow-up (114.6 g/l vs 110.4 g/l, with a difference of 4.12 g/l; p=0.047). In patients with CKD who were treated with an SGLT2i, continuation of SGLT2i use after eGFR declined to 30 ml/min per 1.73 m2 or less was associated with lower risks of cardiovascular and renal events compared with discontinuation of SGLT2i use. Continued use of SGLT2i throughout the course of CKD should be considered to optimise patient outcomes.