This study showed that targeting the XBP1-mediated ER stress response could significantly inhibit tumour growth and enhance anticancer immunity, thus providing a unique approach to cancer immunotherapy. Here, XBP1 is linked to neoplasm.