Condensation is a process whereby a tissue undergoes a coordinated decrease in size and increase in cellular density during development. Although it occurs in many developmental contexts, the mechanisms underlying this process are largely unknown. Here, we investigate condensation in the embryonic Drosophila ventral nerve cord (VNC). Two major events coincide with condensation during embryogenesis: the deposition of extracellular matrix by hemocytes, and the onset of central nervous system activity. We find that preventing hemocyte migration by removing the function of the Drosophila VEGF receptor homologue, Pvr, or by disrupting Rac1 function in these cells, inhibits condensation. In the absence of hemocytes migrating adjacent to the developing VNC, the extracellular matrix components Collagen IV, Viking and Peroxidasin are not deposited around this tissue. Blocking neural activity by targeted expression of tetanus toxin light chain or an inwardly rectifying potassium channel also inhibits condensation. We find that disrupting Rac1 function in either glia or neurons, including those located in the nerve cord, causes a similar phenotype. Our data suggest that condensation of the VNC during Drosophila embryogenesis depends on both hemocyte-deposited extracellular matrix and neural activity, and allow us to propose a mechanism whereby these processes work together to shape the developing central nervous system.