Gene dysfunction and immune cell infiltration play an essential role in the pathogenesis of idiopathic pulmonary arterial hypertension (IPAH). We aimed to investigate the immune landscape and novel differentially expressed genes (DEGs) of IPAH. In addition, potential druggable molecular targets for IPAH were also explored. In this study, the GSE117261 dataset was reanalyzed to explore the immune landscape and hub DEGs of IPAH. Lasso Cox regression analysis and receiver operating characteristic curve analysis were performed to detect the predictive value of IPAH. Additionally, the underlying drug targets for IPAH treatment were determined by drug–gene analysis. IPAH was significantly associated with the transforming growth factor-β (TGF-β) signaling pathway and Wnt signaling pathway as well as energetic metabolism dysfunction. We identified 31 upregulated and 39 downregulated DEGs in IPAH patients. Six hub genes, namely, SAA1, CCL5, CXCR1, CXCR2, CCR1, and ADORA3, were related to IPAH pathogenesis regardless of sex differences. Prediction model analysis showed that the area under the curve values of the hub DEGs except CXCR2 were all above 0.9 for distinguishing IPAH patients. In addition, the relative proportions of 5 subtypes of immune cells, namely, CD8+ T cells, CD4+ memory resting T cells, γ delta T cells, M1 macrophages, and resting mast cells, were significantly upregulated in the IPAH samples, while 6 subtypes of immune cells, namely, CD4+ naive T cells, resting NK cells, monocytes, M0 macrophages, activated mast cells, and neutrophils, were downregulated. Additionally, a total of 17 intersecting drugs targeting 5 genes, CCL5, CXCR1, CXCR2, CCR1, and ADORA3, were generated as potential druggable molecular targets for IPAH. Our study revealed the underlying correlations between genes and immune cells in IPAH and demonstrated for the first time that SAA1, CCL5, CXCR1, CCR1, and ADORA3 may be novel genetic targets for IPAH.