DNA methylation is a dynamic epigenetic mark that undergoes extensive changes during differentiation of self-renewing stem cells. However, whether these changes are the cause or consequence of stem cell fate remains unknown. Here, we show that alternative functional programs of hematopoietic stem cells (HSCs) are governed by gradual differences in methylation levels. Constitutive methylation is essential for HSC self-renewal but dispensable for homing, cell cycle control and suppression of apoptosis. Notably, HSCs from mice with reduced DNA methyltransferase 1 activity cannot suppress key myeloerythroid regulators and thus can differentiate into myeloerythroid, but not lymphoid, progeny. A similar methylation dosage effect controls stem cell function in leukemia. These data identify DNA methylation as an essential epigenetic mechanism to protect stem cells from premature activation of predominant differentiation programs and suggest that methylation dynamics determine stem cell functions in tissue homeostasis and cancer.