Here, a combination of biophysical measurement, modelling, and genetic and experimental manipulation of cell contractile components is used to analyse the formation of the inner cell mass in the early mouse embryo. How cells in mouse blastocyst sort themselves out to generate the inner cell mass, and how the embryos respond to manipulation during early development remain unexplained. Previous studies have indicated the importance of differential cell adhesion or oriented cell division along an apical–basal axis in the sorting phenomenon. Jean-Léon Maître et al. use a combination of biophysical measurement, modelling and both genetic and experimental manipulation of contractile components to analyse inner cell mass formation in the early mouse embryo. They suggest that cell polarization generates cells of different contractilities, which trigger their sorting to inner and outer position. The contractile forces are shown to modulate the sub-cellular localization of Yap, a transcriptional regulator known to influence cell fate. During pre-implantation development, the mammalian embryo self-organizes into the blastocyst, which consists of an epithelial layer encapsulating the inner-cell mass (ICM) giving rise to all embryonic tissues1. In mice, oriented cell division, apicobasal polarity and actomyosin contractility are thought to contribute to the formation of the ICM2,3,4,5. However, how these processes work together remains unclear. Here we show that asymmetric segregation of the apical domain generates blastomeres with different contractilities, which triggers their sorting into inner and outer positions. Three-dimensional physical modelling of embryo morphogenesis reveals that cells internalize only when differences in surface contractility exceed a predictable threshold. We validate this prediction using biophysical measurements, and successfully redirect cell sorting within the developing blastocyst using maternal myosin (Myh9)-knockout chimaeric embryos. Finally, we find that loss of contractility causes blastomeres to show ICM-like markers, regardless of their position. In particular, contractility controls Yap subcellular localization6, raising the possibility that mechanosensing occurs during blastocyst lineage specification. We conclude that contractility couples the positioning and fate specification of blastomeres. We propose that this ensures the robust self-organization of blastomeres into the blastocyst, which confers remarkable regulative capacities to mammalian embryos.