Insects face many predators in the environment. Often a predator will grasp insect prey by a limb. Ants can grasp a leg to immobilize an insect until its nest mates can swarm the insect and kill it. One means of escape is to autotomize (detach) the stuck limb.
A group of scientists* studied the ability of 9 species of Coreid bugs to autotomize limbs. They grasped a limb of a bug with forceps and held the limb for 1 h. The only way for the bugs to escape was to detach the limb. All of the 9 species tested escaped by autotomizing the leg. The bugs studied exhibited a stereotypic behavior of raising the abdomen and dropping it rapidly to apply sufficient shear force to the joint of the stuck leg to separate the joint. The separation always occurred between the trochanter and femur.
*Zachary Emberts, Colette M. St. Mary and Christine W. Miller. Coreidae (Insecta: Hemiptera) Limb Loss and Autotomy. Annals of the Entomological Society of America, 2016, 1–6