This study aimed to screen key genes significantly associated with chronic thromboembolic pulmonary hypertension (CTEPH) and predicted suitable drugs for the treatment of CTEPH from the perspective of immune cells. The dataset GSE130391 was used for this analysis. Differentially expressed genes (DEGs) between the CTEPH and control groups were screened. Abundance of infiltrating immune cells was analyzed and immune-related DEGs were identified. Next, the circular RNA (circRNA)-micro RNA (miRNA)-mRNA network was constructed, followed by functional enrichment analysis. Then, the protein-protein interaction (PPI) network was constructed and drug-gene interactions were predicted. Finally, miRNA and circRNA prediction results were verified by our previously published studies. Five key immune cell-related DEGs [CD83 molecule (CD83), complement c5a receptor 1 (C5AR1), atypical chemokine receptor 1 (ACKR1), profilin 2 (PFN2), and solute carrier family 2 member 3 (SLC2A3)] were identified. Several circRNA-miRNA-mRNA interactions were obtained, including circ_0022342 miR-503-5p SLC2A3 and circ_0002062 miR-92b-3p/miR-92a-3p mannosidase alpha class 2A member 1 (MAN2A1). Immune cell for SLC2A3 was eosinophils and for MAN2A1 was regulatory T cells (Tregs). Additionally, Glufosfamide and Kifunensine might be suitable as candidate drugs for CTEPH treatment. SLC2A3 and MAN2A1 may be important genes for the pathogenesis of CTEPH. Possible immune regulation mechanisms in CTEPH may be circ_0022342 miR-503-5p SLC2A3 and circ_0002062 miR-92b-3p/miR-92a-3p MAN2A1. These results may be helpful for the diagnosis and treatment of CTEPH from the perspective of immunology. • SLC2A3 and MAN2A1 may be important genes for the progression of CTEPH. • circ_0022342— miR-503-5p— SLC2A3 (Eosinophils) is an immune regulation mechanism of CTEPH. • circ_0002062— miR-92b-3p— MAN2A1 (Tregs) is an immune regulation mechanism of CTEPH. • Glufosfamide targeted SLC2A3 and regulated glucose metabolism in CTEPH. • Kifunensine targeted MAN2A1 and might be involved in CTEPH by affecting immunity. [ABSTRACT FROM AUTHOR]