Persistent inflammation driven by cytokines such as type-one interferon (IFN-I) can cause immunosuppression. We show that administration of the Janus kinase 1 (JAK1) inhibitor itacitinib after anti-PD-1 (programmed cell death protein 1) immunotherapy improves immune function and antitumor responses in mice and results in high response rates (67%) in a phase 2 clinical trial for metastatic non-small cell lung cancer. Patients who failed to respond to initial anti-PD-1 immunotherapy but responded after addition of itacitinib had multiple features of poor immune function to anti-PD-1 alone that improved after JAK inhibition. Itacitinib promoted CD8 T cell plasticity and therapeutic responses of exhausted and effector memory-like T cell clonotypes. Patients with persistent inflammation refractory to itacitinib showed progressive CD8 T cell terminal differentiation and progressive disease. Thus, JAK inhibition may improve the efficacy of anti-PD-1 immunotherapy by pivoting T cell differentiation dynamics.