Obesity arising from excessive dietary fat intake is a risk factor for cognitive decline, dementia and neurodegenerative diseases, including Alzheimer’s disease. Here, we studied the effect of long-term high-fat diet (HFD) (24 weeks) and return to normal diet (ND) on behavioral features, microglia and neurons in adult male C57BL/6J mice. Consequences of HFD-induced obesity and dietary changes on general health (coat appearance, presence of vibrissae), sensory and motor reflexes, learning and memory were assessed by applying a phenotypic assessment protocol, the Y maze and Morris Water Maze test. Neurons and microglia were histologically analyzed within the mediobasal hypothalamus, hippocampus and frontal motor cortex after long-term HFD and change of diet. Long periods of HFD caused general health issues (coat alterations, loss of vibrissae), but did not affect sensory and motor reflexes, emotional state, memory and learning. Long-term HFD increased the microglial response (increased Iba1 fluorescence intensity, percentage of Iba1-stained area and Iba1 gene expression) within the hypothalamus, but not in the cortex and hippocampus. In neither of these regions, neurodegeneration or intracellular lipid droplet accumulation was observed. The former alterations were reversible in mice whose diet was changed from HFD to ND. Taken together, long periods of excessive dietary fat alone do not cause learning deficits or spatial memory impairment, though HFD-induced obesity may have detrimental consequences for cognitive flexibility. Our data confirm the selective responsiveness of hypothalamic microglia to HFD.