The function of HDAC2 (histone deacetylase 2, ENSG00000196591) is as follows. Histone deacetylase that catalyzes the deacetylation of lysine residues on the N-terminal part of the core histones (H2A, H2B, H3 and H4) (PubMed:28497810). Histone deacetylation gives a tag for epigenetic repression and plays an important role in transcriptional regulation, cell cycle progression and developmental events (By similarity). Histone deacetylases act via the formation of large multiprotein complexes (By similarity). Forms transcriptional repressor complexes by associating with MAD, SIN3, YY1 and N-COR (PubMed:12724404). Component of a RCOR/GFI/KDM1A/HDAC complex that suppresses, via histone deacetylase (HDAC) recruitment, a number of genes implicated in multilineage blood cell development (By similarity). Acts as a component of the histone deacetylase NuRD complex which participates in the remodeling of chromatin (PubMed:16428440, PubMed:28977666). Component of the SIN3B complex that represses transcription and counteracts the histone acetyltransferase activity of EP300 through the recognition H3K27ac marks by PHF12 and the activity of the histone deacetylase HDAC2 (PubMed:37137925). Also deacetylates non-histone targets: deacetylates TSHZ3, thereby regulating its transcriptional repressor activity (PubMed:19343227). May be involved in the transcriptional repression of circadian target genes, such as PER1, mediated by CRY1 through histone deacetylation (By similarity). Involved in MTA1-mediated transcriptional corepression of TFF1 and CDKN1A (PubMed:21965678). In addition to protein deacetylase activity, also acts as a protein-lysine deacylase by recognizing other acyl groups: catalyzes removal of (2E)-butenoyl (crotonyl), lactoyl (lactyl) and 2-hydroxyisobutanoyl (2-hydroxyisobutyryl) acyl groups from lysine residues, leading to protein decrotonylation, delactylation and de-2-hydroxyisobutyrylation, respectively (PubMed:28497810, PubMed:29192674, PubMed:35044827). {ECO:0000250|UniProtKB:P70288, ECO:0000269|PubMed:12724404, ECO:0000269|PubMed:16428440, ECO:0000269|PubMed:19343227, ECO:0000269|PubMed:21965678, ECO:0000269|PubMed:28497810, ECO:0000269|PubMed:28977666, ECO:0000269|PubMed:29192674, ECO:0000269|PubMed:35044827, ECO:0000269|PubMed:37137925}.