Background: In order to modulate microglial phenotypes in vivo, M1 microglia were depleted by administration of gadolinium chloride and the expression of M2 microglia was induced by IL-4 administration in an animal model of sepsis to better characterize the role of microglial phenotypes in sepsis-induced brain dysfunction. Methods: Wistar rats were submitted to sham or cecal ligation and perforation (CLP) and treated with IL-4 or GdCl3. Animals were submitted to behavioral tests 10 days after surgery. In a separated cohort of animals at 24 h, 3 and 10 days after surgery, hippocampus was removed and cytokine levels, M1/M2 markers and CKIP-1 levels were determined. Results: Modulation of microglia by IL-4 and GdCl3 was associated with an improvement in long-term cognitive impairment. When treated with IL-4 and GdCl3, the reduction of pro-inflammatory cytokines was apparent in almost all analyzed time points. Additionally, CD11b and iNOS were increased after CLP at all time points, and both IL-4 and GdCl3 treatments were able to reverse this. There was a significant decrease in CD11b gene expression in the CLP+GdCl3 group. IL-4 treatment was able to decrease iNOS expression after sepsis. Furthermore, there was an increase of CKIP-1 in the hippocampus of GdCl3 and IL-4 treated animals 10 days after CLP induction. Conclusions: GdCl3 and IL-4 are able to manipulate microglial phenotype in an animal models of sepsis, by increasing the polarization toward an M2 phenotype IL-4 and GdCl3 treatment was associated with decreased brain inflammation and functional recovery.