Glycans are known to play important roles in vertebrate development; however, it is difficult to analyze in mammals because it takes place in utero. Therefore, we used medaka (Oryzias latipes) to clarify the roles of glycans during vertebrate development. beta-1,4-Galactosyltransferase is one of the key enzymes in the biosynthesis of the lactosamine structures that are commonly found on glycoproteins and glycolipids. Here, we show the essential role of beta4GalT2 during medaka development. Depletion of beta4GalT2 by morpholino antisense oligonucleotide injection resulted in significant morphological defects, such as shortening of the anterior-posterior axis, cyclopia, impaired somite segmentation, and head hypoplasia. In situ hybridization analyses revealed that the loss of beta4GalT2 led to defective anterior-posterior axis elongation during gastrulation without affecting organizer formation. Furthermore, a cell tracing experiment demonstrated that beta4GalT2 knockdown mainly affects mediolateral cell intercalation, which contributes to anterior-posterior axis elongation. A cell transplantation experiment indicated that glycans are produced by beta4GalT2 cell-autonomously during gastrulation. beta4GalT2 depletion also led to enhanced apoptosis; however, this does not account for the phenotypic abnormalities, as blockade of apoptosis failed to compensate for the beta4GalT2 depletion. Our data suggest that beta4GalT2 activity is cell-autonomously required in cells undergoing mediolateral cell intercalation, which drives extension movements during medaka gastrulation.