Microglia are the resident macrophages of the CNS, and their functions have been extensively studied in various brain pathologies. The physiological roles of microglia in brain plasticity and function, however, remain unclear. To address this question, we generated CX3CR1(CreER) mice expressing tamoxifen-inducible Cre recombinase that allow for specific manipulation of gene function in microglia. Using CX3CR1(CreER) to drive diphtheria toxin receptor expression in microglia, we found that microglia could be specifically depleted from the brain upon diphtheria toxin administration. Mice depleted of microglia showed deficits in multiple learning tasks and a significant reduction in motor-learning-dependent synapse formation. Furthermore, Cre-dependent removal of brain-derived neurotrophic factor (BDNF) from microglia largely recapitulated the effects of microglia depletion. Microglial BDNF increases neuronal tropomyosin-related kinase receptor B phosphorylation, a key mediator of synaptic plasticity. Together, our findings reveal that microglia serve important physiological functions in learning and memory by promoting learning-related synapse formation through BDNF signaling. Copyright © 2013 Elsevier Inc. All rights reserved.