To explore the effect of tanshinone IIA on diabetic retinopathy (DR) and its mechanism. GeneCards and OMM databases were used to mine DR-related genes. The chemical structure of tanshinone IIA was searched by PubChem, and the potential target was predicted by PharmMapper. Cystape 3.8.2 was used to visualize and analyze the tanshinone IIA-DR protein interaction network. DAVID ver 6.8 data were used to perform enrichment analysis of the tanshinone IIA-DR protein interaction network. Then animal experiments were carried out to further explore the mechanism of tanshinone IIA in the treatment of DR. Male SD rats were intraperitoneally injected with streptozotocin to establish a diabetes model and were randomly divided into a model group, a low-dose tanshinone IIA group and a high-dose group. Normal rats served as the control group. Hematoxylin-eosin (HE) staining was used to observe the structural changes of the retina; the SOD, GSH-Px, and MDA levels in the retina were detected by the xanthine oxidase method; the expression of VEGF, IL-1β, IL-6, TNF-α, and caspase-3 mRNA were detected by qRT-PCR; and the Bcl-2, Bax, and VEGFA proteins were determined by the western blot. A total of 213 tanshinone IIA potential targets and 223 DR-related genes were obtained. The enrichment analysis showed that tanshinone IIA may regulate hypoxia, oxidative stress, positive regulation of ERK1 and ERK2 cascade, steroid hormone-mediated signaling pathway, inflammatory response, angiogenesis, VEGF signaling pathway, apoptosis, PI3K-Akt signaling pathway, TNF signaling pathway, and biological processes and signaling pathways. The structure of the retina in the normal control group was clear, the retina in the model group was not clear, the nerve fiber layer was edema, the retinal cell layers of the tanshinone IIA low-dose group are arranged neatly, the inner and outer nuclear layers are slightly disordered, and the tanshinone IIA low-dose group was large. The structure of the mouse retina was further improved compared with the low-dose tanshinone IIA group. Compared with the model group, the retinal tissue SOD and GSH-PX of rats in the tanshinone IIA group increased, and the MDA level decreased (P < 0.05). Compared with the model group, the expression of VEGF, IL-1β, IL-6, TNF-α, and caspase-3 mRNA in the retina of tanshinone IIA groups was significantly reduced (P < 0.01). Compared with the model group, the Bcl-2 protein in the tanshinone IIA groups increased, while the Bax and VEGFA proteins decreased (P < 0.05). Tanshinone IIA may improve the morphological performance of the retina of diabetic rats and inhibit DR, the mechanism of which may be anti-inflammatory, antiangiogenesis, etc.