Most societies witness an ever increasing prevalence of both obesity and dementia, a scenario related to often underestimated individual and public health burden. Overnutrition and weight gain have been linked with abnormal functionality of homoeostasis brain networks and changes in higher cognitive functions such as reward evaluation, executive functions and learning and memory. In parallel, evidence has accumulated that modifiable factors such as obesity and diet impact the gut–brain axis and modulate brain health and cognition through various pathways. Using neuroimaging data from epidemiological studies and randomised clinical trials, we aim to shed light on the underlying mechanisms and to determine both determinants and consequences of obesity and diet at the level of human brain structure and function. We analysed multimodal 3T MRI of about 2600 randomly selected adults (47 % female, 18–80 years of age, BMI 18–47 kg/m2) of the LIFE-Adult study, a deeply phenotyped population-based cohort. In addition, brain MRI data of controlled intervention studies on weight loss and healthy diets acquired in lean, overweight and obese participants may help to understand the role of the gut–brain axis in food craving and cognitive ageing. We find that higher BMI and visceral fat accumulation correlate with accelerated brain age, microstructure of the hypothalamus, lower thickness and connectivity in default mode- and reward-related areas, as well as with subtle grey matter atrophy and white matter lesion load in non-demented individuals. Mediation analyses indicated that higher visceral fat affects brain tissue through systemic low-grade inflammation, and that obesity-related regional changes translate into cognitive disadvantages. Considering longitudinal studies, some, but not all data indicate beneficial effects of weight loss and healthy diets such as plant-based nutrients and dietary patterns on brain ageing and cognition. Confounding effects of concurrent changes in other lifestyle factors or false positives might help to explain these findings. Therefore a more holistic intervention approach, along with open science tools such as data and code sharing, in-depth pre-registration and pooling of data could help to overcome these limitations. In addition, as higher BMI relates to increased head micro-movements during MRI, and as head motion in turn systematically induces image artefacts, future studies need to rigorously control for head motion during MRI to enable valid neuroimaging results. In sum, our results support the view that overweight and obesity are intertwined with markers of brain health in the general population, and that weight loss and plant-based diets may help to promote brain plasticity. Meta-analyses and longitudinal cohort studies are underway to further differentiate causation from correlation in obesity- and nutrition-brain research.