HMGB1 is a highly conserved nuclear protein widely expressed in mammalian cells. This study aimed to comprehensively investigate the roles and mechanisms of HMGB1 in different tumors. Original data on HMGB1 expression, localization, potential interacting proteins, genetics were obtained from The Cancer Genome Atlas, Genotype-Tissue Expression, Cancer Cell Line Encyclopedia, Human Protein Atlas, Compartmentalized Protein-Protein Interaction and cBioPortal databases. Then, correlation between HMGB1 expression levels and tumor stage, prognosis, potential pathways, tumor microenvironment, ESTIMATE score, immune-related genes, immune cell infiltration, microsatellite instability, tumor mutation burden, or anti-tumor drug resistance was investigated. The above results consistently indicated that high expression of HMGB1 protein may be related to clinical prognosis of HCC patients. Therefore, clinical tissues of HCC patients were selected to verify the differential expression of HMGB1 protein in HCC. The sensitivity of HMGB1-siRNA transfected HepG2 cells to sorafenib was assessed. HMGB1 was found to be differentially expressed in many tumors and normal tissues. HMGB1 was mainly located in the nucleus and might interact with proteins such as TLR2 and TLR4. Furthermore, HMGB1 expression was closely related to tumor stage, prognosis, tumor microenvironment, immune-related genes, immune cell infiltration, microsatellite instability, tumor mutation burden, and anti-tumor drug resistance and might be involved in different pathways of various tumors. Immunohistochemistry results further verified the differential expression of HMGB1 in HCC and paracancerous tissues. HMGB1-siRNA transfected HepG2 cells had a tendency to be more insensitive to sorafenib treatment compared to the control group. HMGB1 was differentially expressed in most tumors and normal tissues, and was closely related to the clinical stage, prognosis, immune infiltration, tumor microenvironment, and drug resistance of tumors. Therefore, HMGB1 may serve as a novel biomarker for predicting tumor prognosis, efficacy of immune checkpoint inhibitors, and a potential target for anti-tumor therapy.