To determine the association of uric acid (UA) and glucose in aqueous humor with diabetic macular edema (DME) in patients with Type 2 diabetes. Patients with DME or diabetes mellitus without retinopathy were enrolled from August 2016 to December 2020. Nondiabetic patients with age-related cataract or age-related macular degeneration were included as controls. A total of 585 eyes from 585 patients were included for this study. Statistical analysis showed that aqueous UA was associated with central retinal thickness (r = 0.39, P < 0.0001), with higher levels of UA in severe DME and lower levels in mild DME, suggesting an ocular source of UA from the diabetic retina. Aqueous UA {odds ratio (OR), 6.88 (95% confidence interval [CI], 2.61-18.12)}, but not aqueous glucose (0.95 [95% CI, 0.73-1.23]) or serum UA (0.90 [95% CI, 0.66-1.23]), was a stronger predictor for DME than the duration of DM (1.26 [95% CI, 1.12-1.42]) or hemoglobin A1c (1.35 [95% CI, 0.99-1.83]). If aqueous UA (<2.46 mg/dL) and aqueous glucose (<6.43 mmol/L) were used as reference, high UA (≥2.46 mg/dL) alone was associated with 5.83-fold increase in risk of DME, but high glucose (≥6.43 mg/dL) alone was not associated with DME. Increased aqueous UA, but not glucose, is an independent risk factor for DME. These data suggest that an intravitreal UA-lowering therapy could be beneficial for DME.