During mammalian terrestrial locomotion, body flexibility facilitated by the vertebral column is expected to be correlated with observed modes of locomotion, known as gait (e.g., sprawl, trot, hop, bound, gallop). In small‐ to medium‐sized mammals (average weight up to 5 kg), the relationship between locomotive mode and vertebral morphology is largely unexplored. Here we studied the vertebral column from 46 small‐ to medium‐sized mammals. Nine vertebrae across cervical, thoracic, and lumbar regions were chosen to represent the whole vertebral column. Vertebra shape was analysed using three‐dimensional geometric morphometrics with the phylogenetic comparative method. We also applied the multi‐block method, which can consider all vertebrae as a single structure for analysis. We calculated morphological disparity, phylogenetic signal, and evaluated the effects of allometry and gait on vertebral shape. We also investigated the pattern of integration in the column. We found the cervical vertebrae show the highest degree of morphological disparity, and the first thoracic vertebra shows the highest phylogenetic signal. A significant effect of gait type on vertebrae shape was found, with the lumbar vertebrae having the strongest correlation; but this effect was not significant after taking phylogeny into account. On the other hand, allometry has a significant effect on all vertebrae regardless of the contribution from phylogeny. The regions showed differing degrees of integration, with cervical vertebrae most strongly correlated. With these results, we have revealed novel information that cannot be captured from study of a single vertebra alone: although the lumbar vertebrae are the most correlated with gait, the cervical vertebrae are more morphologically diverse and drive the diversity among species when considering whole column shape.