Objective To study the therapeutic effect of Huoxue Tongluo Decoction (HXTLD) on erectile dysfunction caused by ischemic stroke and identify the mechanisms involved. Methods Network pharmacology was used to predict the key active ingredients and targets of HXTLD. Surgical methods were used to create a rat model of ischemic stroke. The rats were then given a suspension of HXTLD by ig administration. Erectile function was evaluated by Apomorphine (APO) induction. Real-time fluorescence quantitative reverse transcription-polymerase chain reaction (Real-time PCR) and Western blotting were used to detect the expression of related mRNAs and proteins in rat penile corpus cavernous tissue and brain tissue. Hematoxylin & Eosin (HE) staining was used to investigate structural changes in the penile cavernous tissue. Results Network pharmacology showed that tumor necrosis factor (TNF), nitric oxide synthase 3 (eNOS), and vascular endothelial growth factor (VEGF) were the key targets of HXTLD in the treatment of erectile dysfunction caused by ischemic stroke. Experimental studies showed that HXTLD improved erectile dysfunction caused by ischemic stroke. HE results showed that HXTLD improved the structure of the corpus cavernosa. HXTLD also inhibited the expression of TNF and VEGF proteins in penile tissue (P Conclusion HXTLD improved the erectile function of rats with erectile dysfunction caused by ischemic stroke by regulating the mRNA and protein levels of TNF, eNOS and VEGF.