Multifunctional protein with various roles in different cellular compartments. May act in a redox sensitive manner. In the nucleus is an abundant chromatin-associated non-histone protein involved in transcription, chromatin remodeling and V(D)J recombination and probably other processes (By similarity). Binds DNA with a preference to non-canonical DNA structures such as single-stranded DNA. Can bent DNA and enhance DNA flexibility by looping thus providing a mechanism to promote activities on various gene promoters by enhancing transcription factor binding and/or bringing distant regulatory sequences into close proximity (PubMed:11275566). Involved in V(D)J recombination by acting as a cofactor of the RAG complex: acts by stimulating cleavage and RAG protein binding at the 23 bp spacer of conserved recombination signal sequences (RSS). Proposed to be involved in the innate immune response to nucleic acids by acting as a cytoplasmic promiscuous immunogenic DNA/RNA sensor which cooperates with subsequent discriminative sensing by specific pattern recognition receptors. In the extracellular compartment acts as a chemokine. Promotes proliferation and migration of endothelial cells implicating AGER/RAGE. Has antimicrobial activity in gastrointestinal epithelial tissues. Involved in inflammatory response to antigenic stimulus coupled with pro-inflammatory activity. May play a role in germ cell differentiation. Involved in modulation of neurogenesis probably by regulation of neural stem proliferation. Involved in articular cartilage surface maintenance implicating LEF1 and the Wnt/beta-catenin pathway (By similarity). Interacts with POU2F2, POU2F1 and POU3F1. Component of the RAG complex composed of core components RAG1 and RAG2, and associated component HMGB1 or HMGB2. Component of the SET complex, composed of at least ANP32A, APEX1, HMGB2, NME1, SET and TREX1. Directly interacts with SET. Interacts with LEF1. Both, HMG box 1 and HMG box 2, show antimicrobial activity. Reduction/oxidation of cysteine residues Cys-23, Cys-45 and Cys-106 and a possible intramolecular disulfide bond involving Cys-23 and Cys-45 give rise to different redox forms with specific functional activities in various cellular compartments: 1- fully reduced HMGB2 (HMGB2C23hC45hC106h), 2- disulfide HMGB2 (HMGB2C23-C45C106h) and 3- sulfonyl HMGB2 (HMGB2C23soC45soC106so). Belongs to the HMGB family.