Stem-cell fate can be influenced by metabolite levels in culture, but it is not known whether physiological variations in metabolite levels in normal tissues regulate stem-cell function in vivo. Here we describe a metabolomics method for the analysis of rare cell populations isolated directly from tissues and use it to compare mouse haematopoietic stem cells (HSCs) to restricted haematopoietic progenitors. Each haematopoietic cell type had a distinct metabolic signature. Human and mouse HSCs had unusually high levels of ascorbate, which decreased with differentiation. Systemic ascorbate depletion in mice increased HSC frequency and function, in part by reducing the function of Tet2, a dioxygenase tumour suppressor. Ascorbate depletion cooperated with Flt3 internal tandem duplication (Flt3ITD) leukaemic mutations to accelerate leukaemogenesis, through cell-autonomous and possibly non-cell-autonomous mechanisms, in a manner that was reversed by dietary ascorbate. Ascorbate acted cell-autonomously to negatively regulate HSC function and myelopoiesis through Tet2-dependent and Tet2-independent mechanisms. Ascorbate therefore accumulates within HSCs to promote Tet activity in vivo, limiting HSC frequency and suppressing leukaemogenesis.