The Middle–Upper Jurassic Yanliao Lagerstätte contains numerous exceptionally preserved fossils of aquatic and land organisms, including insects, salamanders, dinosaurs, pterosaurs and mammaliaforms. Despite extensive study of the diversity and evolutionary implications of the biota, the palaeoenvironmental setting and taphonomy of the fossils remain poorly understood. We reconstruct both the palaeoenvironment of the Daohugou area (one of the most famous Yanliao fossil areas), and the biostratinomy of the fossils. We use high-resolution stratigraphic data from field investigation and excavations to document in detail the stratigraphic succession, lithofacies, facies associations, and biostratinomic features of the Lagerstätte. Our results show that frequent volcanic eruptions generated an extensive volcaniclastic apron and lake(s) in the studied area. The frequent alternation of thin lacustrine deposits and thick volcaniclastic apron deposits indicates either that the studied area was located in the marginal regions of a single lake, where the frequent influx of volcaniclastic apron material caused substantial fluctuations in lake area and thus the frequent lateral alternation of the two facies, or that many short-lived lakes developed on the volcaniclastic apron. Most terrestrial insects were preserved in the laminated, normally graded siltstone, claystone and tuff facies that form many thin intervals with deposits of graded sandstone, siltstone and tuff in between. Within each interval the terrestrial insects occur in many laminae associated with abundant aquatic organisms, but are particularly abundant in some laminae that directly underlie tuff of fallout origin. Most of these terrestrial insects are interpreted to have been killed in the area adjacent to the studied palaeolake(s) during volcanic eruptions. Their carcasses were transported by influxes of fresh volcaniclastic material, primarily meteoric runoff and possibly minor distal pyroclastic flow into the palaeolake(s), and were buried in palaeolake deposits prior to extended decay probably due to a combination of rapid vertical settling, ash fall and water turbulence.