Background: Emerging studies suggest that focusing on the intake of specific types or sources of sugars may yield greater benefits in preventing chronic kidney disease (CKD). Objective: We aimed to investigate the associations between free and non-free sugar intakes and CKD risk as well as the potential sugar type-gut microbiome interactions. Methods: A total of 138 064 participants from the UK Biobank were included in this prospective study. The free and non-free sugar intakes were assessed using repeated web-based 24-hour dietary recalls. A cause-specific competing risk model was used to estimate hazard ratios (HRs) and the corresponding confidence intervals (CIs) of incident CKD, treating deaths before incident CKD as competing events. Results: During a median follow-up of 10.5 years, 2,923 participants (2.1%) developed CKD. The free sugar intake was positively associated with the risk of CKD (HRquartile 4 vs. quartile 1 = 1.32, 95% CI = 1.18, 1.47), with a nonlinear relationship (P for nonlinearity = 0.01, the risk increased rapidly after free sugars made up 10% of the total energy). The non-free sugar intake was inversely associated with CKD risk (HRquartile 4 vs. quartile 1 = 0.68, 95% CI = 0.60, 0.77), with an L-shaped nonlinear curve (p for nonlinearity = 0.01, the turning point was at 13.5% of the total energy). We found that the associations between free sugar and non-free sugar intakes and CKD risk were more pronounced in participants with high genetically predicted gut microbial abundance. Furthermore, a significant interaction was observed between the genetically predicted gut microbial abundance and non-free sugar intake (P for interaction = 0.04). Conclusion: A higher intake of free sugars was associated with an elevated risk of CKD, whereas a higher intake of non-free sugars was associated with a reduced risk of CKD. The impact of free sugar intake and non-free sugar intake may be modified by the gut microbial abundance.