The histone deacetylases (HDACs) are a superfamily of chromatin-modifying enzymes that silence transcription through the modification of histones. Among them, HDAC3 is unique in that interaction with nuclear receptor corepressors 1 and 2 (NCoR1/2) is required to engage its catalytic activity1-3. However, global loss of HDAC3 also results in the repression of transcription, the mechanism of which is currently unclear4-8. Here we report that, during the activation of macrophages by lipopolysaccharides, HDAC3 is recruited to activating transcription factor 2 (ATF2)-bound sites without NCoR1/2 and activates the expression of inflammatory genes through a non-canonical mechanism. By contrast, the deacetylase activity of HDAC3 is selectively engaged at ATF3-bound sites that suppress Toll-like receptor signalling. Loss of HDAC3 in macrophages safeguards mice from lethal exposure to lipopolysaccharides, but this protection is not conferred upon genetic or pharmacological abolition of the catalytic activity of HDAC3. Our findings show that HDAC3 is a dichotomous transcriptional activator and repressor, with a non-canonical deacetylase-independent function that is vital for the innate immune system.