The mouse embryo undergoes compaction at the 8-cell stage, and its transition to 16 cells generates polarity such that the outer apical cells are trophectoderm (TE) precursors and the inner cell mass (ICM) gives rise to the embryo. Here, we report that this first cell fate specification event is controlled by glucose. Glucose does not fuel mitochondrial ATP generation, and glycolysis is dispensable for blastocyst formation. Furthermore, glucose does not help synthesize amino acids, fatty acids, and nucleobases. Instead, glucose metabolized by the hexosamine biosynthetic pathway (HBP) allows nuclear localization of YAP1. In addition, glucose-dependent nucleotide synthesis by the pentose phosphate pathway (PPP), along with sphingolipid (S1P) signaling, activates mTOR and allows translation of Tfap2c. YAP1, TEAD4, and TFAP2C interact to form a complex that controls TE-specific gene transcription. Glucose signaling has no role in ICM specification, and this process of developmental metabolism specifically controls TE cell fate.