Invariant natural killer T (iNKT) cells recognize activating self and microbial lipids presented by CD1d. CD1d can also bind non-activating lipids, such as sphingomyelin. We hypothesized that these serve as endogenous regulators and investigated humans and mice deficient in acid sphingomyelinase (ASM), an enzyme that degrades sphingomyelin. We show that ASM absence in mice leads to diminished CD1d-restricted antigen presentation and iNKT cell selection in the thymus, resulting in decreased iNKT cell levels and resistance to iNKT cell-mediated inflammatory conditions. Defective antigen presentation and decreased iNKT cells are also observed in ASM-deficient humans with Niemann-Pick disease, and ASM activity in healthy humans correlates with iNKT cell phenotype. Pharmacological ASM administration facilitates antigen presentation and restores the levels of iNKT cells in ASM-deficient mice. Together, these results demonstrate that control of non-agonistic CD1d-associated lipids is critical for iNKT cell development and function in vivo and represents a tight link between cellular sphingolipid metabolism and immunity.