Snakes are the most diverse group of lizards, but their origins and early evolution remain poorly understood owing to a lack of transitional forms. Several major issues remain outstanding, such as whether snakes originated in a marine or terrestrial environment and how their unique feeding mechanism evolved. The Cretaceous Coniophis precedens was among the first Mesozoic snakes discovered, but until now only an isolated vertebra has been described and it has therefore been overlooked in discussions of snake evolution. Here we report on previously undescribed material from this ancient snake, including the maxilla, dentary and additional vertebrae. Coniophis is not an anilioid as previously thought a revised phylogenetic analysis of Ophidia shows that it instead represents the most primitive known snake. Accordingly, its morphology and ecology are critical to understanding snake evolution. Coniophis occurs in a continental floodplain environment, consistent with a terrestrial rather than a marine origin; furthermore, its small size and reduced neural spines indicate fossorial habits, suggesting that snakes evolved from burrowing lizards. The skull is intermediate between that of lizards and snakes. Hooked teeth and an intramandibular joint indicate that Coniophis fed on relatively large, soft-bodied prey. However, the maxilla is firmly united with the skull, indicating an akinetic rostrum. Coniophis therefore represents a transitional snake, combining a snake-like body and a lizard-like head. Subsequent to the evolution of a serpentine body and carnivory, snakes evolved a highly specialized, kinetic skull, which was followed by a major adaptive radiation in the Early Cretaceous period. This pattern suggests that the kinetic skull was a key innovation that permitted the diversification of snakes.