Heart failure with preserved ejection fraction (HFpEF) is one of the major subtypes of heart failure (HF) and no effective treatments for this common disease exist to date. Cardiac fibrosis is central to the pathology of HF and a potential avenue for the treatment of HFpEF. To explore key fibrosis‐related genes and pathways in the pathophysiological process of HFpEF, a mouse model of HFpEF was constructed. The relevant gene expression profiles were downloaded from the Gene Expression Omnibus database, and single‐sample Gene Set Enrichment Analysis (ssGSEA) was performed targeting fibrosis‐related pathways to explore differentially expressed genes (DEGs) in healthy control and HFpEF heart tissues with cross‐tabulation analysis of fibrosis‐related genes. Gene Ontology (GO) enrichment and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses were performed on the identified fibrosis‐related genes. The two most significant DEGs were selected, and further validation was conducted in HFpEF mice. The results indicated that myocardial fibrosis was significantly upregulated in HFpEF mice compared to healthy controls, while the ssGSEA results revealed significant differences in the enrichment of nine fibrosis‐related pathways in HFpEF myocardial tissue, with 112 out of 798 DEGs being related to fibrosis. The in vivo results demonstrated that expression levels of resistin‐like molecule gamma (Relmg) and adenylate cyclase 1 (Adcy1) in the heart tissues of HFpEF mice were significantly higher and lower, respectively, compared to healthy controls. Taken together, these results suggest that Relmg and Acdy1 as well as the fibrosis process may be potential targets for HFpEF treatment.