Immune-mediated diseases are clinically heterogeneous but they share genetic and pathogenic mechanisms. These diseases may develop from the interplay of genetic factors and environmental or lifestyle factors. Exposure to such factors, including infectious agents, is associated with coordinated changes in gene transcription owing to epigenetic alterations. A growing understanding of how epigenetic mechanisms control gene expression patterns and cell function has been aided by the development of small-molecule inhibitors that target these processes. These chemical tools have helped to reveal the importance of epigenetics in guiding cell fate decisions during immune responses and have also highlighted the potential for targeting epigenetic mechanisms for the treatment of inflammation and immune-mediated diseases. In this Review, we discuss the most advanced areas of epigenetic drug development for autoimmune and inflammatory diseases and summarize the promising preclinical data in this exciting and evolving field. These agents will inevitably begin to move into clinical trials for use in patients with immune-mediated diseases.