Hyperglycemia-related retinopathy is a disease with a high blindness rate. Recent reports indicate that many flavonol compounds have the potential to prevent the occurrence of disease in the retina by regulating the gut–retina axis. Here, we hypothesized that quercetin could alleviate the symptoms of retinopathy. To clarify the mechanism, Sprague Dawley rats were fed a high-fat diet containing quercetin for 12 weeks and injected with streptozotocin in the ninth week. Additionally, neomycin and ampicillin were used to establish a pseudo-sterile rat model. Afterward, changes in the retina were investigated by using electroretinogram and optical coherence tomography. Blood and tissue samples were collected and biochemical components were analyzed. The extent of intestinal injury was determined via hematoxylin-eosin staining. Microbial community structure was analyzed by using 16S ribosomal RNA sequencing. Finally, the expression of genes was analyzed using real-time polymerase chain reaction. The results showed that quercetin reduced the decline in electroretinography amplitude and outer nuclear layer thickness, increased the activities of antioxidant enzymes, decreased the contents of proinflammatory factors and blood glucose, enhanced the concentration of insulin, and inhibited intestinal dysbiosis and improved gut morphology. Importantly, the underexpression of nuclear factor erythroid-2 related factor 2 in the retina was reversed by quercetin. However, trend changes were no longer significant in most of the indicators after antibiotic treatment. In summary, quercetin has therapeutic effects on retinopathy by regulating the gut–retina axis and nuclear factor erythroid-2 related factor 2 pathway, and the presence of gut microbiota helps quercetin exert its effects on the retina.