The commensal microbiota impacts specific immune cell populations and their functions at peripheral sites, such as gut mucosal tissues. However, it remains unknown whether gut microbiota control immunity through regulation of hematopoiesis at primary immune sites. We reveal that germ-free mice display reduced proportions and differentiation potential of specific myeloid cell progenitors of both yolk sac and bone marrow origin. Homeostatic innate immune defects may lead to impaired early responses to pathogens. Indeed, following systemic infection with Listeria monocytogenes, germ-free and oral-antibiotic-treated mice display increased pathogen burden and acute death. Recolonization of germ-free mice with a complex microbiota restores defects in myelopoiesis and resistance to Listeria. These findings reveal that gut bacteria direct innate immune cell development via promoting hematopoiesis, contributing to our appreciation of the deep evolutionary connection between mammals and their microbiota.