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. This evidence concerns the gene CX3CL1 and obesity due to melanocortin 4 receptor deficiency.