Hmgb2−/− CD8+ T cells differentiate into effector and memory T cells during acute viral infection. Here, HMGB2 is linked to viral infectious disease.