Lifestyle has been linked to the incidence of heart failure, but the underlying biological mechanisms remain unclear. Using the metabolomic, lifestyle, and heart failure data of the UK Biobank, we identified and validated healthy lifestyle-related metabolites in a matched case-control and cohort study, respectively. We then evaluated the association of healthy lifestyle-related metabolites with heart failure (HF) risk and the added predictivity of these healthy lifestyle-associated metabolites for HF. Of 161 metabolites, 8 were identified to be significantly related to healthy lifestyle. Notably, omega-3 fatty acids and docosahexaenoic acid (DHA) positively associated with a healthy lifestyle score (HLS) and exhibited a negative association with heart failure risk. Conversely, creatinine negatively associated with a HLS, but was positively correlated with the risk of HF. Adding these three metabolites to the classical risk factor prediction model, the prediction accuracy of heart failure incidence can be improved as assessed by the C-statistic (increasing from 0.806 [95% CI, 0.796–0.816] to 0.844 [95% CI, 0.834–0.854], p-value < 0.001). A healthy lifestyle is associated with significant metabolic alterations, among which metabolites related to healthy lifestyle may be critical for the relationship between healthy lifestyle and HF. Healthy lifestyle-related metabolites might enhance HF prediction, but additional validation studies are necessary.