Powered flight evolved independently in vertebrates in the pterosaurs, birds and bats, each of which has a different configuration of the bony elements and epidermal structures that form the wings1,2. Whereas the early fossil records of pterosaurs and bats are sparse, mounting evidence (primarily from China) of feathered non-avian dinosaurs and stemward avians that derive primarily from the Middle–Upper Jurassic and Lower Cretaceous periods has enabled the slow piecing together of the origins of avian flight3,4. These fossils demonstrate that, close to the origin of flight, dinosaurs closely related to birds were experimenting with a diversity of wing structures3,5. One of the most surprising of these is that of the scansoriopterygid (Theropoda, Maniraptora) Yi qi, which has membranous wings—a flight apparatus that was previously unknown among theropods but that is used by both the pterosaur and bat lineages6. This observation was not universally accepted7. Here we describe a newly identified scansoriopterygid—which we name Ambopteryx longibrachium, gen. et sp. nov.—from the Upper Jurassic period. This specimen provides support for the widespread existence of membranous wings and the styliform element in the Scansoriopterygidae, as well as evidence for the diet of this enigmatic theropod clade. Our analyses show that marked changes in wing architecture evolved near the split between the Scansoriopterygidae and the avian lineage, as the two clades travelled along very different paths to becoming volant. The membranous wings supported by elongate forelimbs that are present in scansoriopterygids probably represent a short-lived experimentation with volant behaviour, and feathered wings were ultimately favoured during the later evolution of Paraves.