The differentiation of bone marrow-derived progenitor cells into monocytes, tissue macrophages and some dendritic cell (DC) subtypes requires the growth factor CSF1 and its receptor, CSF1R. Langerhans cells (LCs) and microglia develop from embryonic myeloid precursor cells that populate the epidermis and central nervous system (CNS) before birth. Notably, LCs and microglia are present in CSF1-deficient mice but absent from CSF1R-deficient mice. Here we investigated whether an alternative CSF1R ligand, interleukin 34 (IL-34), is responsible for this discrepancy. Through the use of IL-34-deficient (Il34 LacZ/LacZ) reporter mice, we found that keratinocytes and neurons were the main sources of IL-34. Il34 LacZ/LacZ mice selectively lacked LCs and microglia and responded poorly to skin antigens and viral infection of the CNS. Thus, IL-34 specifically directs the differentiation of myeloid cells in the skin epidermis and CNS.