We identified disturbed pathways in heart failure (HF) based on Gibbs sampling combined with pathway enrichment analysis. A total of 396 Markov chains (MCs) (gene count >5) were obtained. After Gibbs sampling, six differentially expressed molecular functions (DEMFs) (possibility ≥0.8) were obtained. As statistical analysis was performed on the number of individual differentially expressed genes (DEGs), we found that there were 137 DEGs with frequency of occurrence ≥2 in the DEMFs. Pathway enrichment analysis showed that these 137 DEGs were enriched in eight significant pathways under the condition of P < 0.001. The five most significant pathways were: the calcium signaling pathway (P = 9.08E-19), arrhythmogenic right ventricular cardiomyopathy (P = 5.66E-13), cardiac muscle contraction (P = 8.04E-13), hypertrophic cardiomyopathy (P = 2.55E-12), and dilated cardiomyopathy (P = 7.30E-12). In conclusion, this novel method for identifying significant pathways in HF based on Gibbs sampling combined with pathway enrichment analysis was suitable. We predict that several altered pathways (such as the calcium signaling pathway and dilated cardiomyopathy) may play important roles in HF and are potentially novel predictive and prognostic markers for HF.