To evaluate the association between diuretic use by class with chronic kidney disease (CKD) progression and onset of end-stage renal disease (ESRD). Retrospective cohort study. Large integrated healthcare delivery system in Northern California. Adults with an estimated glomerular filtration rate (eGFR) 15-59 min/1.73 m2 by the CKD-Epidemiology Collaboration equation with no prior diuretic use. ESRD and a renal composite outcome including eGFR <15 mL/min/1.73 m2, 50% reduction in eGFR and/or ESRD. Among 47 666 eligible adults with eGFR 15-59 min/1.73 m2 and no previous receipt of loop or thiazide diuretics, mean age was 71 years, 49% were women and 26% were persons of colour. Overall, the rate (per 100 person-years) of the renal composite outcome was 1.35 (95% CI: 1.30 to 1.41) and 0.42 (95% CI: 0.39 to 0.45) for ESRD. Crude rates (per 100 person-years) of the composite renal outcome were higher in patients who initiated loop diuretics (12.85 (95% CI: 11.81 to 13.98) vs 1.06 (95% CI: 1.02 to 1.12)) and thiazide diuretics (2.68 (95% CI: 2.33 to 3.08) vs 1.29 (95% CI: 1.24 to 1.35)) compared with those who did not. Crude rates (per 100-person years) of ESRD where higher in patients who initiated loop diuretics (4.92 (95% CI: 4.34 to 5.59) vs 0.30 (95% CI: 0.28 to 0.33)), but not in those who initiated thiazide diuretics (0.30 (95% CI: 0.20 to 0.46) vs 0.43 (95% CI: 0.40 to 0.46)). However, neither initiation of diuretics or type of diuretic were significantly associated with CKD progression or ESRD after accounting for receipt of other medications and time-dependent confounders using causal inference methods. The use of thiazide and loop diuretics was not independently associated with an increased risk of CKD progression and/or ESRD in adults with stage 3/4 CKD.