Directed cell movements during gastrulation establish the germ layers of the vertebrate embryo and coordinate their contributions to different tissues and organs. Anterior migration of mesoderm and endoderm has largely been interpreted to result from epiboly and convergent-extension movements that drive body elongation. We show that the chemokine cxcl12b and its receptor Cxcr4A restrict anterior migration of endoderm during zebrafish gastrulation, thereby coordinating its movements with mesoderm. Depletion of either gene product causes the endoderm to separate from mesoderm and migrate farther anterior than normal, due to disruption of integrin-dependent cell adhesion. This results in bilateral duplications of endodermal organs, which may have relevance to human organ defects.