To assess the prevalence and time trends of diabetic retinopathy (DR) in the overall population of Poland from 2013 to 2017 and diagnose the risk factors of occurring DR among patients with diabetes mellitus (DM). Data from all levels of healthcare services at public and private institutions recorded in the National Health Fund (NHF) database were evaluated. International Classification of Diseases codes (ICD-9 and ICD-10) and unique NHF codes were used to identify DM type 1 and type 2 patients, DR and treatment procedures including laser photocoagulation, pars plana vitrectomy (PPV), anti-VEGF and steroid intravitreal injections. The overall registered prevalence of DR in the entire population of Poland was 0.81%. The mean prevalence of DR was 20.01% in the population with type 1 DM and 9.70% in the population with type 2 DM. In the study period, women represented 56.36% of all individuals registered with DR and 55.09% of all DM patients. In Poland, only 6.34% of all DM patients with DR received specific treatment with laser photocoagulation of the retina (82.32%), PPV (11.56%), anti-VEGF or steroid injections (5.15% and 0.97%, respectively). Cox regression hazard analysis showed that the risk of DR was associated with DM treatment only by GPs, female sex, coexisting systemic diseases and urban residence in both type 1 and type 2 DM. A 5-year retrospective analysis reveals the mean prevalence of DR in the population with type 1 and type 2 DM in Poland was rather low.