Given their association with inflammatory processes and oxidative stress, tryptophan metabolites involved in the kynurenine pathway (KP) play a role in the pathophysiology of heart failure with preserved ejection fraction (HFpEF) and type 2 diabetes (T2D). The study aimed to examine the relationship between the parameters of HFpEF, as determined by transthoracic echocardiography, and metabolites of the KP. We prospectively included 120 patients with HFpEF, 60 with and 60 without T2D, and 55 controls. High‑performance liquid chromatography was used to quantify the serum metabolites of KP. Echocardiography was used to assess left ventricular systolic and diastolic function. The patients with HFpEF and T2D showed an increase in tryptophan, kynurenine, and anthranilic acid concentrations (P = 0.001, P <0.001, and P <0.001, respectively) with a concomitant decrease in 3‑hydroxykynurenine (P <0.001) and quinolinic acid (P = 0.003), as compared with those with HFpEF without T2D. Left ventricular and left atrial remodeling was more pronounced in the group with T2D, but differences between these parameters did not reach statistical significance. Left ventricular global longitudinal strain was lower in the subgroup of patients with HFpEF and T2D than in the subgroup without T2D (P = 0.003). The study showed altered tryptophan metabolism in patients with HFpEF, highlighting a possible connection. The findings suggest potential implications for targeted therapeutic strategies focusing on tryptophan metabolism and cardiac function in patients with HFpEF and T2D.