Microglia are the major immune cells in the central nervous system (CNS). Born in peripheral hematopoietic tissues, microglial precursors colonize the CNS during early embryogenesis and maintain themselves thereafter. However, the mechanism underlying this colonization process remains elusive. We have recently demonstrated that neuronal apoptosis contributes to microglia colonization in zebrafish. Here, we further show that prior to neuronal apoptosis, microglial precursors are attracted to the proximal brain regions by brain-derived interleukin 34 (il34) and its receptor colony-stimulating factor 1 receptor a (csf1ra). In both il34- and csf1ra-deficient zebrafish larva, embryonic macrophages fail to migrate to the anterior head and colonize the CNS, but their initial development and colonization to peripheral tissues remain largely unaffected. Activation of Il34-Csf1ra pathway is sufficient to attract embryonic macrophages to the CNS independent of neuronal apoptosis. Our study shows that cytokine signaling and neuronal apoptosis synergistically orchestrate the colonization of microglia in early zebrafish development.