This study systematically investigated the mechanisms underlying the therapeutic effects of Naoxueshu (NXS) on spontaneous intracerebral hemorrhage (sICH) by integrating gut microbiota analysis with network pharmacology strategies. Through database mining and literature screening, seven bioactive compounds of NXS were identified, along with 537 corresponding targets. A total of 80 sICH-related targets were retrieved from multiple disease-associated gene and target databases. Furthermore, 1,248 gut microbiota metabolite targets were obtained from the gutMGene database, and intersection analysis identified 18 overlapping targets shared among NXS, sICH, and the gut microbiota. A protein–protein interaction (PPI) network was constructed based on the intersecting targets, followed by enrichment analysis. Through bioinformatics analysis of the gut microbiota–pathway–target–compound network, the TLR4-mediated NF-κB signaling pathway was identified as a key pathway. Subsequently, ten core targets were identified using Cytoscape, and differential expression analysis of these targets in the intracerebral hemorrhage patient dataset GSE125521 from the Gene Expression Omnibus (GEO) database revealed three core targets with significantly altered expression. Molecular docking was then performed to validate the binding of active NXS components to these core targets, all of which exhibited favorable binding affinities. Analysis of the gutMGene database identified six potentially beneficial gut bacteria, including Faecalibacterium prausnitzii and Lacticaseibacillus rhamnosus. Finally, two key compounds were identified: 1,8-dihydroxy-3-hydroxymethylanthraquinone and 9,10-dimethoxypterocarpan-3-O-β-D-glucoside. These compounds were shown to comply with Lipinski's rule of five. Collectively, our findings demonstrate that NXS can modulate gut microbial homeostasis and intervene in the progression of sICH through multiple pathways, and that the core active compounds hold promise as candidate drug molecules for sICH.