The metabolic challenges present in tumors attenuate the metabolic fitness and antitumor activity of tumor-infiltrating T lymphocytes (TILs). However, it remains unclear whether persistent metabolic insufficiency can imprint permanent T cell dysfunction. We found that TILs accumulated depolarized mitochondria as a result of decreased mitophagy activity and displayed functional, transcriptomic and epigenetic characteristics of terminally exhausted T cells. Mechanistically, reduced mitochondrial fitness in TILs was induced by the coordination of T cell receptor stimulation, microenvironmental stressors and PD-1 signaling. Enforced accumulation of depolarized mitochondria with pharmacological inhibitors induced epigenetic reprogramming toward terminal exhaustion, indicating that mitochondrial deregulation caused T cell exhaustion. Furthermore, supplementation with nicotinamide riboside enhanced T cell mitochondrial fitness and improved responsiveness to anti-PD-1 treatment. Together, our results reveal insights into how mitochondrial dynamics and quality orchestrate T cell antitumor responses and commitment to the exhaustion program.