Microglia are the primary immune cells in the central nervous system and undergo significant morphological and transcriptional changes after traumatic brain injury (TBI). However, their exact contribution to the pathogenesis of TBI is still debated and remains to be elucidated. In the present study, thy-1 GFP mice received a colony-stimulating factor 1 receptor inhibitor (PLX3397) for 21 consecutive days, then were subjected to moderate fluid percussion injury (FPI). Brain samples were collected at 1 day and 3 days after FPI for flow cytometry analysis, immunofluorescence, dendrite spine quantification, terminal deoxynucleotidyl transferase dUTP nick end labeling assay, and Western blot. We found that PLX3397 treatment significantly attenuated the percentages of resident microglia and infiltrated immune cells. Depletion of microglia promoted neurite outgrowth, preserved dendritic spines and reduced total brain cell and neuronal apoptosis after FPI, which was accompanied by decreased the protein levels of endoplasmic reticulum stress marker proteins, C/EBP-homologous protein and inositol-requiring kinase 1α. Taken together, these findings suggest that microglial depletion may exert beneficial effects in the acute stage of FPI.