Epigenetics, as a discipline that aims to explain the differential expression of phenotypes arising from the same gene sequence and the heritability of epigenetic expression, has received much attention in medicine. Epigenetic mechanisms are constantly being discovered, including DNA methylation, histone modifications, noncoding RNAs and m6A. The immune system mainly achieves an immune response through the differentiation and functional expression of immune cells, in which epigenetic modification will have an important impact. Because of immune infiltration in the tumor microenvironment, immunotherapy has become a research hotspot in tumor therapy. Epigenetics plays an important role in autoimmune diseases and cancers through immunology. An increasing number of drugs targeting epigenetic mechanisms, such as DNA methyltransferase inhibitors, histone deacetylase inhibitors, and drug combinations, are being evaluated in clinical trials for the treatment of various cancers (including leukemia and osteosarcoma) and autoimmune diseases (systemic lupus erythematosus, rheumatoid arthritis, systemic sclerosis). This review summarizes the progress of epigenetic regulation for cancers and autoimmune diseases to date, shedding light on potential therapeutic strategies.