Excessive consumption of diets high in sugars and saturated fat, frequently known as western diet (WD), may lead to obesity and metabolic syndrome. Recent evidence shows that WD-induced obesity impairs cardiac function, but the underlying mechanisms are not fully understood. Trimethylamine N-oxide (TMAO), a gut microbiota-dependent metabolite of specific dietary nutrients, has emerged as a key contributor to cardiovascular disease pathogenesis. We tested the hypothesis that elevated circulating TMAO levels contribute to cardiac dysfunction in WD-induced obesity. CD1 mice were fed a normal diet (ND) or a WD, without or with 1.0% 3,3-Dimethyl-1-butanol (DMB, an inhibitor of trimethylamine formation) in drinking water for 8 weeks. Compared with mice fed a ND, mice fed a WD showed a significant increase in body weight and dyslipidemia, and had markedly higher plasma TMAO levels at the end of the feeding protocol. Echocardiography revealed that cardiac systolic and diastolic function was impaired in mice fed a WD. DMB treatment had no effects on body weight and dyslipidemia, but significantly reduced plasma TMAO levels and prevented cardiac dysfunction in mice fed a WD. In addition, mice fed a WD had elevated expression of pro-inflammatory cytokines tumor necrosis factor-α and interleukin IL-1β, decreased expression of anti-inflammatory cytokine IL-10, and increased interstitial fibrosis in the hearts, all of which were prevented by DMB treatment. Notably, DMB treatment also reduced plasma TMAO levels in mice fed a ND but did not alter other parameters. These results suggest that consumption of a WD increases circulating TMAO levels, which lead to cardiac inflammation and fibrosis, contributing to cardiac dysfunction. Interventions that reduce circulating TMAO levels may be a novel therapeutic strategy for prevention and treatment of WD-induced cardiac dysfunction.