Sleep deprivation (SD) is a hallmark of modern society and associated with many neuropsychiatric disorders, including depression and anxiety. However, the cellular and molecular mechanisms underlying SD-associated depression and anxiety remain elusive. Does the neuroinflammation play a role in mediating the effects of SD? In this study, we investigated SD-induced cellular and molecular alterations in the hippocampus and asked whether treatment with an anti-inflammatory drug, minocycline, could attenuate these alterations. We found that SD animals exhibit activated microglia and decreased levels of Keap1 and Nrf2 (antioxidant and anti-inflammatory factors) in the hippocampus. In vivo local field potential recordings show decreased theta and beta oscillations, but increased high gamma oscillations, as a result of SD. Behavioral analysis revealed increased immobility time in the forced swim and tail suspension tests, and decreased sucrose intake in SD mice, all indicative of depressive-like behavior. Moreover, open field test and elevated plus maze test results indicated that SD increases anxiety-like behavior. Interestingly, treatment with the microglial modulator minocycline prevented SD-induced microglial activation, restored Keap1 and Nrf2 levels, normalized neuronal oscillations, and alleviated depressive-like and anxiety-like behavior. The present study reveals that microglial activation and Keap1-Nrf2 signaling play a crucial role in SD-induced behavioral alteration, and that minocycline treatment has a protective effect on these alterations.