Collective migration of epithelial cells is a fundamental process in multicellular pattern formation. As they expand their territory, cells are exposed to various physical forces generated by cell–cell interactions and the surrounding microenvironment. While the physical stress applied by neighbouring cells has been well studied, little is known about how the niches that surround cells are spatio-temporally remodelled to regulate collective cell migration and pattern formation. Here, we analysed how the spatio-temporally remodelled extracellular matrix (ECM) alters the resistance force exerted on cells so that the cells can expand their territory. Multiple microfabrication techniques, optical tweezers, as well as mathematical models were employed to prove the simultaneous construction and breakage of ECM during cellular movement, and to show that this modification of the surrounding environment can guide cellular movement. Furthermore, by artificially remodelling the microenvironment, we showed that the directionality of collective cell migration, as well as the three-dimensional branch pattern formation of lung epithelial cells, can be controlled. Our results thus confirm that active remodelling of cellular microenvironment modulates the physical forces exerted on cells by the ECM, which contributes to the directionality of collective cell migration and consequently, pattern formation.