Metabolic programming controls immune cell lineages and functions, but little is known about γδ T cell metabolism. Here, we found that γδ T cell subsets making either interferon-γ (IFN-γ) or interleukin (IL)-17 have intrinsically distinct metabolic requirements. Whereas IFN-γ+ γδ T cells were almost exclusively dependent on glycolysis, IL-17+ γδ T cells strongly engaged oxidative metabolism, with increased mitochondrial mass and activity. These distinct metabolic signatures were surprisingly imprinted early during thymic development and were stably maintained in the periphery and within tumors. Moreover, pro-tumoral IL-17+ γδ T cells selectively showed high lipid uptake and intracellular lipid storage and were expanded in obesity and in tumors of obese mice. Conversely, glucose supplementation enhanced the antitumor functions of IFN-γ+ γδ T cells and reduced tumor growth upon adoptive transfer. These findings have important implications for the differentiation of effector γδ T cells and their manipulation in cancer immunotherapy.