Most lizards walk and run with a sprawling gait in which the limbs are partly advanced by lateral undulation of the axial skeleton. Ribs and vertebrae are integral to this locomotor mode, but 3D motion of the axial skeleton has not been reported for lizard locomotion. Here, we use XROMM to quantify the relative motions of the vertebrae and ribs during slow treadmill locomotion in three savannah monitor lizards (Varanus exanthematicus) and three Argentine black and white tegus (Salvator merianae). To isolate locomotion, we selected strides with no concurrent lung ventilation. Rib rotations can be decomposed into bucket-handle rotation around a dorsoventral axis, pump-handle rotation around a mediolateral axis, and caliper rotations around a craniocaudal axis. During locomotion, every rib measured in both species rotated substantially around its costovertebral joint (8–17 degrees, summed across bucket, pump and caliper rotations). In all individuals from both species, the middle ribs rotated cranially through bucket and pump-handle motion during the propulsive phase of the ipsilateral forelimb. Axial kinematics during swing phase of the ipsilateral forelimb were mirror images of the propulsive phase. Although further work is needed to establish what causes these rib motions, active contraction of the hypaxial musculature may be at least partly responsible. Unilateral locomotor rib movements are remarkably similar to the bilateral pattern used for lung ventilation, suggesting a new hypothesis that rib motion during locomotion may have been an exaptation for the evolution of costal aspiration breathing in stem amniotes.