The water-to-land transition represents a key stage in the evolution of tetrapod vertebrates. The mechanical constraints inherent to this new environment led amniotes to develop novel locomotor strategies that granted them access to various ecological niches, thus contributing to the evolutionary success of the clade. Today, amniotes show great locomotor and postural diversity, especially in reptiles, whose extant representatives include erect bipeds (birds), ‘semi-erect’ quadrupeds (crocodilians) and sprawling quadrupeds (lepidosaurs and turtles). But the different stages that led to such diversity remain enigmatic and the locomotion of many extinct species, such as the Triassic Euparkeria capensis and Marasuchus lilloensis, raises questions. The study of femoral microanatomy in reptiles can help address these uncertainties though. Indeed, this locomotor diversity is accompanied by great microanatomical disparity. Here we show how microanatomical parameters measured in cross-section, such as bone compactness and the position of the medullo-cortical transition, can be related to locomotion and posture in reptiles. Using statistical methods accounting for phylogeny (flexible phylogenetic discriminant analyses), we develop inferential models from a sample of femur cross-sections belonging to 51 reptilian species. We use these models to infer the locomotion of seven extinct reptile taxa. This study contributes to the understanding of the evolution of locomotion in various primitive reptile species. Our models and methods could be used by palaeontologists to infer locomotion and posture in other extinct reptilian taxa, especially when considered in combination with other lines of evidence.