The immunosuppressive tumor microenvironment (TME) greatly limits the actual outcome of immunotherapy. Therefore, it is urgent to develop appropriate strategies to reshape the TME and ultimately induce a strong immune response. Here, we developed a dual-functional liposome loaded with the photothermal agent IR808 near the infrared region (NIR) and Toll-like-receptor-7 (TLR7) agonist loxoribine prodrug (Lipo@IR808@Loxo) to achieve NIR light-triggered photothermal therapy (PTT) and the targeted delivery of immune adjuvants. Under NIR irradiation, Lipo@IR808@Loxo could greatly improve the efficiency of PTT to directly kill tumor cells and release tumor-associated antigens, which could work together with loaded loxoribine to relieve the immunosuppressive TME, effectively promoting the activation of antigen-presenting cells and subsequent antigen presentation. In this way, Lipo@IR808@Loxo could act as an in situ therapeutic cancer vaccine, eventually inducing a potent antitumor T-cell response. When further combined with immune checkpoint blockade, Lipo@IR808@Loxo-mediated photothermal immunotherapy could not only eliminate the primary tumors but also inhibit the growth of distant tumors, thus enhancing the abscopal effect.