Many organisms live in the soil but only a little is known about their ecology especially movement style. Scarab beetle larvae do not have appendages to shovel soil and their trunk is thick compared to their body length. Hence, their movement through the soil is perplexing. Here, we established the observation and analysis system of larval movement and found that the last larval instars of Trypoxylus dichotomus burrow in two different ways, depending on the hardness of the soil. If the soil is soft, the larvae keep their body in a straight line and use longitudinal expansion and contraction; if the soil is hard, they flex and rotate their body. It is thought that the larvae adapt to diverse soil conditions using two different excavation methods. These results are important for understanding the soil ecology and pose a challenge to engineer of newer excavation technology.