BackgroundThe etiology of dilated cardiomyopathy (DCM) is unclear. Bioinformatics algorithms may help to explore the underlying mechanisms. Therefore, we aimed to screen diagnostic biomarkers and identify the landscape of immune infiltration in DCM.MethodsFirst, the CIBERSORT algorithm was used to excavate the proportion of immune-infiltration cells in DCM and normal myocardial tissues. Meanwhile, the Pearson analysis and principal component analysis (PCA) were used to identify immune heterogeneity in different tissues. The Wilcoxon test, LASSO regression, and machine learning method were conducted to identify the hub immune cells. In addition, the differentially expressed genes (DEGs) were screened by the limma package, and DEGs were analyzed for functional enrichment. In the protein–protein interaction (PPI) network, multiple algorithms were used to calculate the score of each DEG for screening the hub genes. Subsequently, external datasets were used to further validate the expression of hub genes, and the receiver operating characteristic (ROC) curve was used to analyze the diagnostic efficacy. Finally, we examined the expression of hub biomarkers in animal models.ResultsA total of 108 DEGs were screened, and these genes may be related to biological processes such as cytolysis, positive regulation of cytokine secretion, etc. Two types of hub immune cells [activated natural killer (NK) cells and eosinophils] and four hub genes (ASPN, CD163, IL10, and LUM) were identified in DCM myocardial tissues. CD163 was verified to have the capability to diagnose DCM with the most excellent specificity and sensitivity. It is worth mentioning that the combined CD163 and eosinophils may have better diagnostic efficacy. Moreover, the correlation analysis showed CD163 was negatively correlated with activated NK cells. Finally, the results of the mice model also indicated that CD163 might be involved in the occurrence of DCM.ConclusionASPN, CD163, IL10, and LUM may have a potential predictive ability for DCM, and especially CD163 showed the most robust efficacy. Furthermore, activated NK cells and eosinophils may relate to the occurrence of DCM.