Immune checkpoint blockade therapy has shifted the paradigm for cancer treatment. However, the majority of patients lack effective responses due to insufficient T cell infiltration in tumors. Here we show that expression of mitochondrial uncoupling protein 2 (UCP2) in tumor cells determines the immunostimulatory feature of the tumor microenvironment (TME) and is positively associated with prolonged survival. UCP2 reprograms the immune state of the TME by altering its cytokine milieu in an interferon regulatory factor 5-dependent manner. Consequently, UCP2 boosts the conventional type 1 dendritic cell- and CD8+ T cell-dependent anti-tumor immune cycle and normalizes the tumor vasculature. Finally we show, using either a genetic or pharmacological approach, that induction of UCP2 sensitizes melanomas to programmed cell death protein-1 blockade treatment and elicits effective anti-tumor responses. Together, this study demonstrates that targeting the UCP2 pathway is a potent strategy for alleviating the immunosuppressive TME and overcoming the primary resistance of programmed cell death protein-1 blockade.