In ant colonies, collectivity enables division of labour and resources1,2,3 with great scalability. Beyond their intricate social behaviours, individuals of the genus Odontomachus4, also known as trap-jaw ants, have developed remarkable multi-locomotion mechanisms to ‘escape-jump’ upwards when threatened, using the sudden snapping of their mandibles5, and to negotiate obstacles by leaping forwards using their legs6. Emulating such diverse insect biomechanics and studying collective behaviours in a variety of environments may lead to the development of multi-locomotion robotic collectives deployable in situations such as emergency relief, exploration and monitoring7; however, reproducing these abilities in small-scale robotic systems with simple design and scalability remains a key challenge. Existing robotic collectives8,9,10,11,12 are confined to two-dimensional surfaces owing to limited locomotion, and individual multi-locomotion robots13,14,15,16,17 are difficult to scale up to large groups owing to the increased complexity, size and cost of hardware designs, which hinder mass production. Here we demonstrate an autonomous multi-locomotion insect-scale robot (millirobot) inspired by trap-jaw ants that addresses the design and scalability challenges of small-scale terrestrial robots. The robot’s compact locomotion mechanism is constructed with minimal components and assembly steps, has tunable power requirements, and realizes five distinct gaits: vertical jumping for height, horizontal jumping for distance, somersault jumping to clear obstacles, walking on textured terrain and crawling on flat surfaces. The untethered, battery-powered millirobot can selectively switch gaits to traverse diverse terrain types, and groups of millirobots can operate collectively to manipulate objects and overcome obstacles. We constructed the ten-gram palm-sized prototype—the smallest and lightest self-contained multi-locomotion robot reported so far—by folding a quasi-two-dimensional metamaterial18 sandwich formed of easily integrated mechanical, material and electronic layers, which will enable assembly-free mass-manufacturing of robots with high task efficiency, flexibility and disposability.