Nuclear pore complexes (NPCs) fuse the inner and outer membranes of the nuclear envelope. They comprise hundreds of nucleoporins (Nups) that assemble into multiple subcomplexes and form large central channels for nucleocytoplasmic exchange1,2. How this architecture facilitates messenger RNA export, NPC biogenesis and turnover remains poorly understood. Here we combine in situ structural biology and integrative modelling with correlative light and electron microscopy and molecular perturbation to structurally analyse NPCs in intact Saccharomyces cerevisiae cells within the context of nuclear envelope remodelling. We find an in situ conformation and configuration of the Nup subcomplexes that was unexpected from the results of previous in vitro analyses. The configuration of the Nup159 complex appears critical to spatially accommodate its function as an mRNA export platform, and as a mediator of NPC turnover. The omega-shaped nuclear envelope herniae that accumulate in nup116Δ cells3 conceal partially assembled NPCs lacking multiple subcomplexes, including the Nup159 complex. Under conditions of starvation, herniae of a second type are formed that cytoplasmically expose NPCs. These results point to a model of NPC turnover in which NPC-containing vesicles bud off from the nuclear envelope before degradation by the autophagy machinery. Our study emphasizes the importance of investigating the structure-function relationship of macromolecular complexes in their cellular context.