Objective To investigate the causal association between heart failure and cerebrospinal fluid metabolite levels using a two-sample Mendelian randomization (MR) analysis method. Methods Based on publicly available genome-wide association study (GWAS) summary data, heart failure was used as the exposure and the levels of 338 cerebrospinal fluid metabolites as the outcome variables; single nucleotide polymorphisms (SNPs) strongly associated with heart failure were selected as instrumental variables. The inverse-variance weighted (IVW) method was used as the primary analysis, supplemented by MR-Egger regression, weighted median estimator, simple mode, and weighted mode for complementary validation. The original P<0.05 was used as the threshold for result interpretation, and no multiple comparison correction was performed. Sensitivity analyses, including leave-one-out analysis, Cochran's Q test, MR-Egger intercept test, and funnel plot, were conducted to evaluate the robustness of the results. Results IVW results showed that a total of 14 cerebrospinal fluid metabolites had potential causal associations with heart failure (all P<0.05). Among them, 13 metabolites showed positive β values, including sphingomyelins, lysophosphatidylcholines, acylcarnitines, and organic acids; those with larger effect sizes were N-palmitoyldihydrosphingomyelin (d18:0/16:0) (β=0.299), citramalic acid (β=0.283), sphingomyelin (d18:1/20:1, d18:2/20:0) (β=0.273), and arachidonic acid (20:4n6) (β=0.263). Only 2-piperidone showed a negative β value (β=-0.330). Except for 2-piperidone, for which the effect estimate direction of MR-Egger regression was inconsistent with that of IVW, the effect directions of all other MR analysis methods for the remaining 13 metabolites were consistent with IVW. Leave-one-out analysis showed that after removing a single SNP one by one, the causal effect directions of the 14 cerebrospinal fluid metabolites did not reverse; among them, for 7 metabolites, the 95% confidence interval (CI) of the effect estimate crossed the null line (β=0) after removing a specific single SNP, while for the remaining 7 metabolites, the 95% CI did not cross the null line after removing any single SNP. For each of the 14 cerebrospinal fluid metabolites, the P values of Cochran's Q test and MR-Egger intercept test were all >0.05, and the funnel plots were approximately symmetric. Conclusion Heart failure has potential causal associations with multiple cerebrospinal fluid metabolite levels, particularly sphingomyelins and lysophosphatidylcholines among the lipid metabolites.