Some insects autotomise appendages such as legs to escape from predator attacks. Similar behaviour can be observed in other situations. Here, we report that Shachia circumscripta (Lepidoptera: Notodontidae) larvae bite off their long anal prolegs to facilitate pupation in fallen branches. Larvae of S. circumscripta have extremely long anal prolegs, comprising one half of their body length. When disturbed, S. circumscripta larvae use their anal prolegs in defensive posturing. Final instar larvae use their mandibles to tunnel into fallen branches and form a pupal chamber inside. Just before closing the entrances of pupal chambers, larvae bite off their anal prolegs with their mandibles and eject the severed prolegs through the chamber entrance. The extremely long anal prolegs can hinder the larvae from turning in the tunnels before closing the chamber entrance; leg cutting in S. circumscripta larvae may therefore be an adaptive behaviour that allows the insect to pupate within the limited space of fallen branches.