Non-alcoholic fatty liver disease (NAFLD) and heart failure (HF) are related conditions with an increasing incidence. However, the mechanism underlying their association remains unclear. This study aimed to explore the shared pathogenic mechanisms and common biomarkers of NAFLD and HF through bioinformatics analyses and experimental validation. NAFLD and HF-related transcriptome data were extracted from the Gene Expression Omnibus (GEO) database (GSE126848 and GSE26887). Differential analysis was performed to identify common differentially expressed genes (co-DEGs) between NAFLD and HF. Gene ontology (GO), Kyoto Encyclopedia of Genes and Genomes (KEGG), and gene set enrichment analysis (GSEA) were conducted to explore the functions and regulatory pathways of co-DEGs. Protein-protein interaction (PPI) network and support vector machine-recursive feature elimination (SVM-RFE) methods were used to screen common key DEGs. The diagnostic value of common key DEGs was assessed by receiver operating characteristic (ROC) curve and validated with external datasets (GSE89632 and GSE57345). Finally, the expression of biomarkers was validated in mouse models. A total of 161 co-DEGs were screened out in NAFLD and HF patients. GO, KEGG, and GSEA analyses indicated that these co-DEGs were mainly enriched in immune-related pathways. PPI network revealed 14 key DEGs, and SVM-RFE model eventually identified two genes (CD163 and CCR1) as common key DEGs for NAFLD and HF. Expression analysis revealed that the expression levels of CD163 and CCR1 were significantly down-regulated in HF and NAFLD patients. ROC curve analysis showed that CD163 and CCR1 had good diagnostic values for HF and NAFLD. Single-gene GSEA suggested that CD163 and CCR1 were mainly engaged in immune responses and inflammation. Experimental validation indicated unbalanced macrophage polarization in HF and NAFLD mouse models, and the expression of CD163 and CCR1 were significantly down-regulated. This study identified M2 polarization impairment characterized by decreased expression of CD163 and CCR1 as a common pathogenic pathway in NAFLD and HF. The downregulation of CD163 and CCR1 may reflect key pathological changes in the development and progression of NAFLD and HF, suggesting their potential as diagnostic and therapeutic targets.