High-fat (HF) diet modulates gut microbiota and increases plasma concentration of lipopolysaccharide (LPS) which is associated with obesity and its related low-grade inflammation and cognitive decline. Rhein is the main ingredient of the rhubarb plant which has been used as an anti-inflammatory agent for several millennia. However, the potential effects of rhein against HF diet-induced obesity and its associated alteration of gut microbiota, inflammation and cognitive decline have not been studied. In this study, C57BL/6J male mice were fed an HF diet for 8 weeks to induce obesity, and then treated with oral rhein (120 mg/kg body weight/day in HF diet) for a further 6 weeks. Chronic rhein treatment prevented the HF diet-induced recognition memory impairment assessed by the novel object recognition test, neuroinflammation and brain-derived neurotrophic factor (BDNF) deficits in the perirhinal cortex. Furthermore, rhein inhibited the HF diet-induced increased plasma LPS level and the proinflammatory macrophage accumulation in the colon and alteration of microbiota, including decreasing Bacteroides-Prevotella spp. and Desulfovibrios spp. DNA and increasing Bifidobacterium spp. and Lactobacillus spp. DNA. Moreover, rhein also reduced body weight and improved glucose tolerance in HF diet-induced obese mice. In conclusion, rhein improved recognition memory and prevented obesity in mice on a chronic HF diet. These beneficial effects occur via the modulation of microbiota, hypoendotoxinemia, inhibition of macrophage accumulation, anti-neuroinflammation and the improvement of BDNF expression. Therefore, supplementation with rhein-enriched food or herbal medicine could be beneficial as a preventive strategy for chronic HF diet-induced cognitive decline, microbiota alteration and neuroinflammation.