Advanced-stage liver cancers are associated with poor prognosis and have limited treatment options, often leading the patient to hospice care. Percutaneous intratumoral injection of anticancer agents has emerged as a potential alternative to systemic therapy to overcome tumor barriers, increase bioavailability, potentiate immunotherapy, and avoid systemic toxicity, which advanced-stage cancer patients cannot tolerate. Here, an injectable OncoGel (OG) comprising of a nanocomposite hydrogel loaded with an ionic liquid (IL) is developed for achieving a predictable and uniform tumor ablation and long-term slow release of anticancer agents into the ablation zone. Rigorous mechanical, physiochemical, drug release, cytotoxicity experiments, and ex vivo human tissue testing identify an injectable version of the OG with bactericidal properties against highly resistant bacteria. Intratumoral injection of OG loaded with Nivolumab (Nivo) and doxorubicin (Dox) into highly malignant tumor models in mice, rats, and rabbits demonstrates enhanced survival and tumor regression associated with robust tissue ablation and drug distribution throughout the tumor. Mass cytometry and proteomic studies in a mouse model of colorectal cancer that often metastasizes to the liver indicate an enhanced anticancer immune response following the intratumoral injection of OG. OG may augment immunotherapy and potentially improve outcomes in liver cancer patients.