Here we identify sex-specific differences in hypothalamic microglial activation via the CX3CL1-CX3CR1 pathway that mediate the resistance of female mice to diet-induced obesity. Here, CX3CR1 is linked to obesity due to melanocortin 4 receptor deficiency.