Autism spectrum disorders (ASDs) are neurodevelopmental disorders caused by various genetic and environmental factors that result in synaptic abnormalities. ASD development is suggested to involve microglia, which have a role in synaptic refinement during development. Autophagy and related pathways are also suggested to be involved in ASDs. However, the precise roles of microglial autophagy in synapses and ASDs are unknown. Here, we show that microglial autophagy is involved in synaptic refinement and neurobehavior regulation. We found that deletion of atg7, which is vital for autophagy, from myeloid cell-specific lysozyme M-Cre mice resulted in social behavioral defects and repetitive behaviors, characteristic features of ASDs. These mice also had increases in dendritic spines and synaptic markers and altered connectivity between brain regions, indicating defects in synaptic refinement. Synaptosome degradation was impaired in atg7-deficient microglia and immature dendritic filopodia were increased in neurons co-cultured with atg7-deficient microglia. To our knowledge, our results are the first to show the role of microglial autophagy in the regulation of the synapse and neurobehaviors. We anticipate our results to be a starting point for more comprehensive studies of microglial autophagy in ASDs and the development of putative therapeutics.