The ability of primary tumor cells to invade into adjacent tissues, followed by the formation of local or distant metastasis, is a lethal hallmark of cancer. Recently, locomoting clusters of tumor cells have been identified in numerous cancers and associated with increased invasiveness and metastatic potential. However, how the collective behaviors of cancer cells are coordinated and their contribution to cancer invasion remain unclear. Here we show that collective invasion of breast cancer cells is regulated by the energetic statuses of leader and follower cells. Using a combination of in vitro spheroid and ex vivo organoid invasion models, we found that cancer cells dynamically rearrange leader and follower positions during collective invasion. Cancer cells invade cooperatively in denser collagen matrices by accelerating leader–follower switching thus decreasing leader cell lifetime. Leader cells exhibit higher glucose uptake than follower cells. Moreover, their energy levels, as revealed by the intracellular ATP/ADP ratio, must exceed a threshold to invade. Forward invasion of the leader cell gradually depletes its available energy, eventually leading to leader–follower transition. Our computational model based on intracellular energy homeostasis successfully recapitulated the dependence of leader cell lifetime on collagen density. Experiments further supported model predictions that decreasing the cellular energy level by glucose starvation decreases leader cell lifetime whereas increasing the cellular energy level by AMP-activated kinase (AMPK) activation does the opposite. These findings highlight coordinated invasion and its metabolic regulation as potential therapeutic targets of cancer.