The tumor microenvironment typically possesses immunosuppressive properties that hinder the effectiveness of antitumor immune responses, even in the context of immunotherapies. However, it is observed that pathogenic microorganisms can trigger strong immune responses during infection, offering a potential means to counteract the immunosuppressive environment of tumors. In this study, a protein nanocage called CpG@HBc nanocages (NCs) is developed, which mimics the structure of the hepatitis B virus and combines with an immunostimulatory component known as cytosine phosphoguanosine oligonucleotide (CpG). By delivering these immunostimulatory agents, CpG@HBc NCs are able to effectively reverse the suppressive tumor microenvironment, resulting in the inhibition of poorly immunogenic tumors in mice. Through high-dimensional mass cytometry (CyTOF) analysis, remarkable alterations in immune responses is observed induced by CpG@HBc. Treatment with immunogenic CpG@HBc NCs, along with co-injection of an OX40 agonist, sensitized colorectal cancer tumors to T cell immune responses, resulting in significant impairment of tumor growth and robust immune activation. Furthermore, CpG@HBc NCs induced long-term antitumor immunological memory, protecting tumor-cured mice from tumor rechallenge. Overall, these findings highlight the potential of a virus-inspired protein nanocage to mimic anti-viral immunity and offer a unique therapeutic approach for cancer immunotherapy.