The onset of lymphocyte development in the vertebrate primordial thymus, about 500 million years ago, represents one of the foundational events of the emerging adaptive immune system. Here, we retrace the evolutionary trajectory of thymopoiesis, from early vertebrates to mammals, guided by members of the Foxn1/4 transcription factor gene family, which direct the differentiation of the thymic microenvironment. Molecular engineering in transgenic mice recapitulated a gene duplication event, exon replacements, and altered expression patterns. These changes predictably modified the lymphopoietic characteristics of the thymus, identifying molecular features contributing to conversion of a primordial bipotent lymphoid organ to a tissue specializing in T cell development. The phylogenetic reconstruction associates increasing efficiency of T cell generation with diminishing B cell-generating capacity of the thymus during jawed vertebrate evolution. Copyright © 2020 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).