BackgroundDiabetic retinopathy (DR) development is associated with disturbances in the gut microbiota and related metabolites. Butyric acid is one of the short-chain fatty acids (SCFAs), which has been found to possess a potential antidiabetic effect. However, whether butyrate has a role in DR remains elusive. This study aimed to investigate the effect and mechanism of sodium butyrate supplementation on DR.MethodsC57BL/6J mice were divided into three groups: Control group, diabetic group, and diabetic with butyrate supplementation group. Type 1 diabetic mouse model was induced by streptozotocin. Sodium butyrate was administered by gavage to the experimental group daily for 12 weeks. Optic coherence tomography, hematoxylin–eosin, and immunostaining of whole-mount retina were used to value the changes in retinal structure. Electroretinography was performed to assess the retinal visual function. The tight junction proteins in intestinal tissue were evaluated using immunohistochemistry. 16S rRNA sequencing and LC–MS/MS were performed to determine the alteration and correlation of the gut microbiota and systemic SCFAs.ResultsButyrate decreased blood glucose, food, and water consumption. Meanwhile, it alleviated retinal thinning and activated microglial cells but improved electroretinography visual function. Additionally, butyrate effectively enhanced the expression of ZO-1 and Occludin proteins in the small intestine. Crucially, only butyric acid, 4-methylvaleric acid, and caproic acid were significantly decreased in the plasma of diabetic mice and improved after butyrate supplementation. The deeper correlation analysis revealed nine genera strongly positively or negatively correlated with the above three SCFAs. Of note, all three positively correlated genera, includingnorank_f_Muribaculaceae,Ileibacterium, andDubosiella, were significantly decreased in the diabetic mice with or without butyrate treatment. Interestingly, among the six negatively correlated genera,Escherichia-ShigellaandEnterococcuswere increased, whileLactobacillus,Bifidobacterium,Lachnospiraceae_NK4A136_group, andunclassified_f_Lachnospiraceaewere decreased after butyrate supplementation.ConclusionTogether, these findings demonstrate the microbiota regulating and diabetic therapeutic effects of butyrate, which can be used as a potential food supplement alternative to DR medicine.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12967-023-04259-4.