Portal hypertension (PH) is an important cause of pulmonary arterial hypertension(PAH), but its mechanism is still unclear. We used genetic data analysis to explore the shared genes and molecular mechanisms of PH and PAH. We downloaded the PH and PAH data from the GEO database, and used the weighted gene coexpression network analysis method (WGCNA) to analyze the coexpression modules of idiopathic noncirrhotic portal hypertension (INCPH) and cirrhotic portal hypertension (CPH) and pulmonary hypertension, respectively. Enrichment analysis was performed on the common genes, and differential gene expressions (DEGs) were used for verification. The target genes of INCPH and PAH were obtained by string and cytoscape software, and the miRNAs of target genes were predicted by miRwalk, miRDB, and TargetScan and their biological functions were analyzed; finally, we used PanglaoDB to predict the expression of target genes in cells. In WGCNA, gene modules significantly related to PAH, CPH, and INCPH were identified, and enrichment function analysis showed that the common pathway of PAH and CPH were “P53 signaling pathway,” “synthesis of neutral lipids”; PAH and INCPH are “terminal,” “Maintenance Regulation of Granules,” and “Toxin Transport.” DEGs confirmed the results of WGCNA; the common miRNA functions of PAH and cirrhosis were enriched for “P53 signaling pathway,” “TGF-β signaling pathway,” “TNF signaling pathway,” and “fatty acid metabolism,” and the miRNAs-mRNAs network suggested that hsa-miR-22a-3p regulates MDM2 and hsa-miR-34a-5p regulates PRDX4; the target genes of PAH and INCPH are EIF5B, HSPA4, GNL3, RARS, UTP20, HNRNPA2B1, HSP90B1, METAP2, NARS, SACM1L, and their target miRNA function enrichment showed EIF5B, HNRNPA2B1, HSP90B1, METAP2, NARS, SACM1L, and HSPA4 are associated with telomeres and inflammation, panglaoDB showed that target genes are located in endothelial cells, smooth muscle cells, etc. In conclusion, the mechanism of pulmonary hypertension induced by portal hypertension may be related to telomere dysfunction and P53 overactivation, and lipid metabolism and intestinal inflammation are also involved in this process.