In the present study, we investigated the mechanism of safflower-danshen treatment for coronary artery disease (CAD) through bioinformatics, network pharmacology, and single-cell sequencing. To identify target genes for hydroxy safflower yellow pigment, tanshinone, danshinolic acid, and tanshinol, we employed various databases, including Comparative Toxicogenomics Database, Swiss target prediction, Binding Database Home, and TargetNet. By analyzing three CAD datasets obtained from the GEO database, we identified CAD-associated genes using differential analysis and a weighted gene coexpression network analysis (WGCNA). We integrated drug-disease genes and utilized the mcode plugin in Cytoscape to identify core subgroups in the drug-disease regulatory networks. The infiltration of 38 immune cells/functions was assessed using the ssGSEA algorithm. Additionally, single-cell RNA sequencing (SCS) was employed to examine the distribution of cellular subpopulations within the mcode regulatory network. Finally, we performed GO and KEGG enrichment analyses for drug target genes, disease genes, and mcode core subpopulation genes. Our results revealed 485 drug target genes obtained from four databases. Through differential analysis and WGCNA, we identified 617 disease genes associated with CAD. The mcode plugin analysis yielded a drug-disease core regulatory subpopulation consisting of 99 genes. The ssGSEA algorithm indicated that members of the TGFβ family, chemokines, and interleukin receptors might play key roles in the immune regulation of safflower-danshen treatment for CAD. Furthermore, SCS results suggested that macrophages and monocytes might be core cell subpopulations within this context. GO and KEGG enrichment analyses highlighted endosome-bound organelles and nuclei as potentially important cellular components. In conclusion, safflower-danshen treatment for CAD might exert its therapeutic effects by modulating TGFβ family members, chemokines, interleukin receptors, macrophages, monocytes, endosome-bound organelles, and nuclei.