The bioactive lysophospholipid mediator sphingosine-1-phosphate (S1P) promotes the egress of newly formed T cells from the thymus and the release of immature B cells from the bone marrow. It has remained unclear, however, where and how S1P is released. Here, we show that in mice, the S1P transporter spinster homolog 2 (Spns2) is responsible for the egress of mature T cells and immature B cells from the thymus and bone marrow, respectively. Global Spns2-KO mice exhibited marked accumulation of mature T cells in thymi and decreased numbers of peripheral T cells in blood and secondary lymphoid organs. Mature recirculating B cells were reduced in frequency in the bone marrow as well as in blood and secondary lymphoid organs. Bone marrow reconstitution studies revealed that Spns2 was not involved in S1P release from blood cells and suggested a role for Spns2 in other cells. Consistent with these data, endothelia-specific deletion of Spns2 resulted in defects of lymphocyte egress similar to those observed in the global Spns2-KO mice. These data suggest that Spns2 functions in ECs to establish the S1P gradient required for T and B cells to egress from their respective primary lymphoid organs. Furthermore, Spns2 could be a therapeutic target for a broad array of inflammatory and autoimmune diseases.