It is increasingly recognized that immune development within mucosal tissues is under the control of environmental factors during early life. However, the cellular mechanisms that underlie such temporally and regionally restrictive governance of these processes are unclear. Here, we uncover an extrathymic pathway of immune development within the colon that is controlled by embryonic but not bone marrow-derived macrophages, which determines the ability of these organs to receive invariant natural killer T (iNKT) cells and allow them to establish local residency. Consequently, early-life perturbations of fetal-derived macrophages result in persistent decreases of mucosal iNKT cells and is associated with later-life susceptibility or resistance to iNKT cell-associated mucosal disorders. These studies uncover a host developmental program orchestrated by ontogenically distinct macrophages that is regulated by microbiota, and they reveal an important postnatal function of macrophages that emerge in fetal life.