The body shape of seahorses resembles the head and neck of horses because of their curved trunk, their ventrally bent head and their long snout. Seahorses evolved from ancestral, pipefish-like species, which have a straight body. Here, we use a biomechanical analysis and show that the seahorse's peculiar head, neck and trunk posture allows for the capture of small shrimps at larger distances from the eyes compared with pipefish. The results from the mathematical modelling were confirmed by kinematic data of prey-capturing syngnathids: compared with straight-bodied pipefish, all seahorse species studied consistently show an additional forward-reaching component in the path travelled by the mouth during their strikes at prey. This increased strike distance enlarges the volume of water they can probe for food, which is especially useful for tail-attached, sit-and-wait predators like seahorses. The biomechanics of prey capture thus provides a putative selective advantage that may explain the bending of the trunk into a horse-like shape.