We have developed models of HIV latency using microglia derived from adult human patient brain cortex and transformed with the SV40 T large and hTERT antigens. Latent clones infected by HIV reporter viruses display high levels of spontaneous HIV reactivation in culture. BrainPhys, a medium highly representative of the CNS extracellular environment, containing low glucose and 1% FBS, reduced, but did not prevent, HIV reactivation. We hypothesized that spontaneous HIV reactivation in culture was due to the expression of pro-inflammatory genes, such as TNF-α, taking place in the absence of the natural inhibitory signals from astrocytes and neurons. Indeed, expression and secretion of TNF-α is strongly reduced in HIV-latently infected microglia compared to the subset of cells that have undergone spontaneous HIV reactivation. Whereas inhibitors of NF-κB or of macrophage activation only had a short-term silencing effect, addition of dexamethasone (DEXA), a glucocorticoid receptor (GR) agonist and mediator of anti-inflammation, silenced the HIV provirus in a long-term, and shRNA-mediated knock-down of GR activated HIV. DEXA also decreased secretion of a number of cytokines, including TNF-α. Chromatin immunoprecipitation analysis revealed that DEXA strongly increased GR occupancy at the HIV promoter, and reduced histone 3 acetylated levels. Moreover, TNF-α expression inhibitors in combination with DEXA induced further HIV silencing and increased the histone 3 lysine 27 tri-methylated epigenetic mark of repression at the HIV promoter region. We conclude that GR is a critical repressor of HIV transcription in microglia, and a novel potential pharmacological target to restrict HIV expression in the CNS.